how to write program in cpp enter the principal, rate & time and print the simple interest

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about how to write program in cpp enter the principal, rate & time and print the simple interest.So let’s go to our topic #include <iostream.h> #include <conio.h> void main() { clrscr(); int x; float sinterest,principal,rate,time; for(x=4;x>=0;x—) { cout << “Enter the … Read more

How to write Program switch between different cases in cpp

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about How to write Program switch between different cases in cpp .So let’s go to our topic #include <iostream.h> #include <conio.h> int main() { clrscr(); int choice; cout << “1. Talk” << endl; cout << “2. Eat” << endl; cout << “3. … Read more

Program to enter three integers and output the biggest integer using IF

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  Program to enter three integers and output the biggest integer using IF .So let’s go to our topic #include <iostream.h> #include <conio.h> int main() { clrscr(); int x,y,z,biggest; cout << “Enter 3 integers : “; cin>>x>>y>>z; biggest=x; if(y>biggest) biggest=y; if(z>biggest) … Read more

Program to change the background colors on the screen

  #include <conio.h> #include <graphics.h> #include <stdlib.h> #include <stdio.h> void main (int) { int gdriver=DETECT,gmode,errorcode; //Requesting auto-detection. int midx,midy,x; //Initializing graphics and local variables. initgraph(&gdriver,&gmode,“d:\bc3\bgi”); //Reading result of initialization. errorcode=graphresult(); if(errorcode!=grOk) //An error occurred. { printf(“Graphics error occurred : %s \n”,grapherrormsg(errorcode)); printf(“Press any key to stop : “); getch(); exit(1); //Terminate the program due to … Read more

Program to draw 2 rectangles and fill 1 of them in cpp

  #include <iostream.h> #include <conio.h> #include <graphics.h> #include <ctype.h> #include <stdlib.h> #include <stdio.h> void main() { clrscr(); int gd = DETECT,gm,errorcode; //Requesting auto-detection. //Initializing graphics and local variables. initgraph (&gd, &gm, “d:\bc3\bgi”); //Path where graphics drivers are installed //Read result of initialization. errorcode = graphresult(); //An error occured. if (errorcode != grOk) { cout << … Read more

Program to change the foreground colors and draw circles on the screen

  #include <conio.h> #include <graphics.h> #include <stdlib.h> #include <stdio.h> void main (int) { int gdriver=DETECT,gmode,errorcode; //Requesting auto-detection. int midx,midy,x; //Initializing graphics and local variables. initgraph(&gdriver,&gmode,“d:\bc3\bgi”); //Reading result of initialization. errorcode=graphresult(); if(errorcode!=grOk) //An error occurred. { printf(“Graphics error occurred : %s \n”,grapherrormsg(errorcode)); printf(“Press any key to stop : “); getch(); exit(1); //Terminate the program due to … Read more