Bigger

Friday, 14 November 2014

How to change text color in dos box /Turbo c++ compiler

---------------------------------------------------------------------
#include<conio.h>
int main()
{
int i;

 for (i=1;i<=10;i++)
{
textcolor(i);
cprintf("  %d  ",i);
}
getch();
return 0;
}
//textcolor is a function defined in conio.h library
--------------------------------------------------------------------------
output:-

No comments:

Post a Comment