U A C M

¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
U A C M

Universidad Autónoma de la Ciudad de México


    PROGRAMA QUE DIBUJA UN PLANO CARTESIANO

    Krlos
    Krlos
    Admin


    Mensajes : 72
    Fecha de inscripción : 11/05/2011

    PROGRAMA QUE DIBUJA UN PLANO CARTESIANO Empty PROGRAMA QUE DIBUJA UN PLANO CARTESIANO

    Mensaje  Krlos Vie Mayo 20, 2011 4:49 pm

    /*
    PROGRAMA QUE DIBUJA UN PLANO CARTESIANO
    CARLOS E. LOPEZ
    */


    #include <winbgim.h>
    #include <stdlib.h>
    #include <math.h>
    int main()
    {
    int x=-7;
    int y;
    initwindow(640,480);//crea una ventana de tamaño 640*480
    outtextxy(getmaxx()-10,getmaxy()/2+10,"x");
    outtextxy(getmaxx()/2+10,getmaxy()-10,"y");
    line(0,getmaxy()/2,getmaxx(),getmaxy()/2);
    line(getmaxx()/2,getmaxy(),getmaxx()/2,0);
    for(x=10;x<640;x=x+10)
    {
    setcolor(12);
    line(x,240,x,230);
    }
    for(y=10;y<480;y=y+10)
    {
    setcolor(10);
    line(315,y,325,y);
    }
    system("pause");
    closegraph();
    }

      Fecha y hora actual: Dom Mayo 19, 2024 7:22 am