Deber de la ESPE

Marcos
13 de Mayo del 2008
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <dos.h>

void main()
{
int gdriver = DETECT, gmode, errorcode;
int xmax, ymax;
struct dosdate_t d;
char *a,*b,*c;

initgraph(&gdriver, &gmode, "");
errorcode = graphresult();
if (errorcode != grOk)
{
printf("Graphics error: %sn", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1);
}


xmax = getmaxx();
ymax = getmaxy();

_dos_getdate(&d);

itoa(d.year,a,10);
itoa(d.day,b,10);
itoa(d.month,c,10);

settextstyle(4, HORIZ_DIR, 10);
outtextxy(xmax/2+5,ymax/2-100,a);
outtextxy(xmax/2-300,ymax/2-100,b);
outtextxy(xmax/2-100,ymax/2-100,c);

getch();
closegraph();
}