Menu

saurabhnissa Archive

How to change Background color in turbo C and C++ using Setbkcolor function

Background color in turbo C Here a Graphics program for you like Background color in turbo C. How to color the output of a program in C #include<stdio.h> #include<graphics.h> #include<conio.h> main() { int gd = DETECT, gm, drawing_color,x,y,s; initgraph(&gd,&gm,“C:\\TC\\BGI“); setbkcolor(2); printf(“\n Enter first Number:-“); scanf(“%d”,&x); printf(“\n Enter second Number:-“); scanf(“%d”,&y); s=x+y; printf(“\n Sum of two

Text color in C programming and CPP using Setbkcolor function

Text color in C programming Write a program to Text color in C programming and change the Background color of console output in C and CPP Setbkcolor function in c #include<stdio.h> #include<graphics.h> #include<conio.h> main() { int gd = DETECT, gm, drawing_color; char a[100]; initgraph(&gd,&gm,“C:\\TC\\BGI”); drawing_color = getcolor(); setcolor(RED); setbkcolor(10); sprintf(a,“Current drawing color is RED “);

How to Change the Color the output of a program in C and C++ using text background

Color the output of a program in C Background Color Menu using SetConsoleTextAttribute for Color the output of a program in C Text background  in C  #include<stdio.h> #include<conio.h> #include<windowS.h> int main() { printf(“\n\n\t\tTheSmolt-Learn for Free\n\n\n”); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_GREEN); printf(“This is Green Background!”); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_BLUE|BACKGROUND_RED| BACKGROUND_INTENSITY); printf(“\n\n This is Magenta?”); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED); printf(“\n\n This color is Red color)\n”); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_GREEN|BACKGROUND_INTENSITY); printf(“\n\nThis

C program to draw a square using graphics in c with output

C program to draw a square using graphics C program to draw a square using graphics Maybe some time CodeBlock IDE does not support this program. Because the following code is compiled by Turbo C Compiler. Graphics program in c #include<stdio.h> #include<graphics.h> #include<conio.h> int main() { int gd=DETECT,gm; int i,j; initgraph (&gd, &gm, ” “);
Learn For Free.