Watch Project Live Source Code

 #include<stdio.h>

#include<conio.h>
#include<graphics.h>
#include<time.h>
#include<dos.h>
#include<string.h>
void main()
{
	int gdriver=DETECT,gmode;
	int midx,midy,err;
	long mytime;
	char date[256];

	initgraph(&gdriver,&gmode,"");
	err=graphresult();

	if(err!=0)
	{
		printf("Graphics Error: %s\n",grapherrormsg(err));

	}

	midx=getmaxx()/2;
	midy=getmaxy()/2;

	midx=getmaxx()/2;
	midy=getmaxy()/2;

	while(!kbhit())
	{

	cleardevice();
	printf("RT LAVKUSH");

		mytime=time(NULL);



		strcpy(date,ctime(&mytime));
		settextjustify(CENTER_TEXT,CENTER_TEXT);
		settextstyle(TRIPLEX_FONT,HORIZ_DIR,5);
		moveto(midx,midy);
		outtext(date);
		sleep(1);
	}
	getch();
	closegraph();
}

Previous Post Next Post