#include<stdio.h>
#include<math.h>
int main(void)
{
int i,np;
float dt,t,Sat;
FILE *fp;
fp = fopen("Sa.xls","w");
printf("Please input dt:\n");
scanf("%f",&dt);
printf("Please input np:\n");
scanf("%d",&np);
for(i=-np/2;i<=np/2;i++)
{
t=i*dt;
if(t==0)
Sat = 1;
else
Sat = sin(t)/t;
fprintf(fp,"%f\t%f\n",t,Sat);
}
fclose(fp);
return 0;
}
01-28
908
12-08
685
01-12
2788
06-25
1214