urgente, PROGRAMA QUE REALICE LA GRAFICA DE LA FUNCION COSENO. MEDIANTE CICLO REPETITIVO.

frepricar
23 de Marzo del 2006
urgente, PROGRAMA QUE REALICE LA GRAFICA DE LA FUNCION COSENO. MEDIANTE UN CICLO REPETITIVO.

crisam
23 de Marzo del 2006
// no se si esto es lo que necesitas o sino explicame


#include<conio.h>
#include<graphics.h>
#include<math.h>
#include<dos.h>


void main()
{
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver, &gmode, "d:borlandcbgi");
for ( int x = -getmaxx()/2;x<=getmaxx()/2;x++)
{
int y = cos((3.1416*x)/180)*50;
putpixel(x+getmaxx()/2,250-y,WHITE);
delay(5);
}

getch();
}