using turboc++
------------------------------------------------------------------------------
//understanding textcolor in graphics
#include<stdio.h>
#include<conio.h>// contains textcolor() and text background().
void main()
{
clrscr();
textbackground(RED); //Sets background red
textcolor(GREEN); //sets textcolor green
cprintf("first line...........\n");
textcolor(GREEN);
textbackground(BLUE);
cprintf("This is a test\n");//sends formatted output to the text window on the screen
//Does not work with printf.
getch();
}
/*second part prints line from that location where
first part is finished
*/
..............................................................................
------------------------------------------------------------------------------
//understanding textcolor in graphics
#include<stdio.h>
#include<conio.h>// contains textcolor() and text background().
void main()
{
clrscr();
textbackground(RED); //Sets background red
textcolor(GREEN); //sets textcolor green
cprintf("first line...........\n");
textcolor(GREEN);
textbackground(BLUE);
cprintf("This is a test\n");//sends formatted output to the text window on the screen
//Does not work with printf.
getch();
}
/*second part prints line from that location where
first part is finished
*/
..............................................................................
No comments:
Post a Comment