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

Detect keypress and print ASCII value C++

Here we will write a program to Detect keypress and print ASCII value C++. We will use a infinite while loop until user press ESC(escape button on keyboard), user will enter a key and the program will provide the ASCII value of the input. WAP to Detect keypress and print ASCII value C++: PROGRAM: #include<iostream> #include<conio.h> … Read more