#include "header.h" int main (void) { float x; int i,n; clock_t start,end; double timelaspe; FILE *fin; fin=fopen("test","r"); // the file used to test the program is called "test". start=clock(); printf (" x Cordic(x) MySine(x) sin(x)\n"); while (fscanf(fin,"%f",&x)!=-1) //read the data until the end of the file.assign each value in the file to x. { printf ("%.6lf\t%.6lf\t%.6lf\t%.6lf\n",x,Cordic(x),MySin(x),sin(x)); } end=clock(); timelaspe=(double)(end-start)/CLOCKS_PER_SEC; // timelaspe is the running time in miliseconds. printf("the running time=%f\n",timelaspe); fclose(fin); return 0; }