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

Snake and Ladder Game C++

This code implements the classic Snake and Ladder game C++. It can be played by two players.   This program is compiled with Turbo C++, you can download it from here Turbo C++   PROGRAM to implement Snake and Ladder Game in C++: #include<stdio.h> #include<graphics.h> #include<conio.h> #include<malloc.h> #include<stdlib.h> #include<dos.h> #include<iostream.h> int k=1, i, user=0, dice=0, … Read more

Simulation of Ethernet in C++

Simulation of Ethernet This Simulation of Ethernet C Project is to simulate the Ethernet model explained in the class room. In this project, I was able to implement the interaction of Station-Process (SP) with the Communication Bus Process (CBP) through Socket programming. The SP is developed in C and the CBP is developed in C++. … Read more

Tetris game’s easy implementation in C++

Following is program to implement Tetris Game C++, this is simple code created using <graphics.h>   This program is compiled and executed in Turbo C++   C++ Program to implement Tetris Game: // Program in C++ to implement Tetris Game. #include <conio.h> #include <graphics.h> #include <dos.h> #include <stdlib.h> #include <process.h> #include <time.h> int score=0; void … 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

Program to display filled isosceles triangle in C++

C++ Program to display filled isosceles triangle PROGRAM: #include<iostream> using namespace std; int main() { int e=1; cout<<"" Triangle Shape SHAPE ":nn"; for(int a=1;a<=5;a++) { for(int b=4;b>=a;b–) { cout<<" "; // Printing Space Here } for(int c=0;c<e;c++) { cout<<"*"; // Printing asterisk here } cout<<endl; // new line e=e+2; } }   OUTPUT: Triangle Shape * … Read more