#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
textcolor(6);
cprintf("Showing date and time
");
printf("
");
textcolor(2);
cprintf("Date:%s",DATE);
printf("
");
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.
#include<conio.h>
void main()
{
clrscr();
textcolor(6);
cprintf("Showing date and time
");
printf("
");
textcolor(2);
cprintf("Date:%s",DATE);
printf("
");
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.
0 comments:
Post a Comment