urgente, PROGRAMA QUE REALICE LA GRAFICA DE LA FUNCION COSENO. MEDIANTE CICLO REPETITIVO.
urgente, PROGRAMA QUE REALICE LA GRAFICA DE LA FUNCION COSENO. MEDIANTE UN CICLO REPETITIVO.
// 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();
}
#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();
}