/* ARCHIVA LOS VALORES DE LA FUNCION SENO DE 0 A 2_PI */
#include<stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
FILE *destino;
void Guardar(double X, double Y)
{
char Cadena[80];
sprintf(Cadena, "%f,%f\n", X, Y);
fputs(Cadena, destino);
}
void Evalua( )
{
double k = 0, Yfun=0;
int Xpixel, Ypixel;
destino=fopen("VAL_SENO.txt","w");
if ( destino==NULL )
{
printf( "Problemas con los archivo.\n" );
exit( 1 );
}
for (k=0; k<= 2*M_PI; k+=0.1)
{
Yfun = sin(k);
Guardar(k, Yfun);
}
}
int main() { Evalua( ); }