#include cstdlib>
#include iostream>
#include math.h>
#define pi 3.14159265
using namespace std;
int main(int argc, char *argv[])
{
FILE *fp;
int i;
double a[1000];
fp = fopen("data.txt", "a+");
for (i=1; i<=900; i++){
a[i]=sin(i*pi/180);
printf ("%d\t",i );
printf ("a=%f\n",a[i] );
fprintf( fp, "%d\t",i );
fprintf( fp, "%f\n",a[i] );
}
fclose(fp);
system("PAUSE");
return EXIT_SUCCESS;
}