C++ Program to find cube of number

This program takes in an integer a as a screen input from the user. It then find cube of number and outputs it using the ‘cout’ command. PROGRAM: #include <iostream.h> #include <conio.h> int cube(int x); //The prototype. void main() { clrscr(); int a; cout << "Enter an integer : "; cin>>a; cout << "The cube … Read more

Program to Find the simple interest in C++

Here we will write a program to calculate Simple Interest in C++, everyone is familiar what simple interest is. Simply,     Simple Interest = Principle x Time x Rate divided by 100  or S. I. = PxTxR/100 How program works: This program takes in the prinicipal, rate and time as a screen input from … Read more

Hangman Game C++

It is a simple project just to provide a Hang Man game concept.In this project I haven’t draw a man for a wrong choice so,try to draw a simple man by using “|” pattern in your project which make your project better . Here is the source code ,copy and compile it in Code::blocks gcc … Read more

Drawing Taj Mahal C++

Wonder of the World Drawing Taj Mahal C++ Code   This code is compiled in Turbo C++ so this may not execute on newer compilers like GCC. You can download Turbo C++ to run this code   PROGRAM: #include<graphics.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<process.h> main() { int gd=DETECT,gm; initgraph(&gd,&gm,"f:\tc\bgi"); int h=40; line(0,440,639,440); //=================================Ist tower========================// //=================================IIst tower============================// … Read more

Program to create Inverted triangle shape C++

Write a Program to Create Inverted Triangle Shape C++:   For other triangle and diamonds shapes see –> Patterns and Shapes in C++ PROGRAM: #include<iostream> using namespace std; int main() { cout<<""Inverted Triangle Shape"\n\n"; int w=6; for(int g=0;g<9;g++) { cout<<"*"; // Displaying asterisk here } cout<<endl; // endl is for new line for(int a=1;a<=3;a++) { for(int … Read more