Translate

Labels

Monday 29 April 2013

SHOWING DATE AND TIME OF YOUR LOCAL PC TIME USING C PROGRAM

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
textcolor(6);
cprintf("Showing date and time \n");
printf("\n");
textcolor(2);
cprintf("Date:%s",DATE);
printf("\n");
textcolor(4);
cprintf("Time:%s",TIME);
getch();
}

cprintf() function you can see color formatted output.
textcolor() function gives the specific color.
By executing this program you can see the current date and time of your local PC time.

No comments: