C++ Program to Print Truth Table of XY+Z

Here you will get C++ program to print truth table of XY+Z. #include<iostream> using namespace std; int main() { int x,y,z; cout<<“X\tY\tZ\tXY+Z”; for(x=0;x<=1;++x) for(y=0;y<=1;++y) for(z=0;z<=1;++z) { if(x*y+z==2) cout<<“\n\n”<<x<<“\t”<<y<<“\t”<<z<<“\t1”; else cout<<“\n\n”<<x<<“\t”<<y<<“\t”<<z<<“\t”<<x*y+z; } return 0; }   Output X Y Z XY+Z 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 …

C++ Program to Print Truth Table of XY+Z Read More »

C++ Program to Add Two Numbers

Here you will get C++ program to add two numbers. The program will ask user to enter two numbers and then calculate their sum. #include<iostream> using namespace std; int main() { int x,y,sum; cout<<“Enter first no: “; cin>>x; cout<<“Enter second no: “; cin>>y; sum=x+y; cout<<“\nSum = “<<sum; return 0; } Output Enter first no: 4 …

C++ Program to Add Two Numbers Read More »

C program to find greatest number among three numbers

#include<stdio.h> #include<conio.h> void main() { int x,y,z,max; clrscr(); printf(“Enter The Three Numbers:”); scanf(“%d%d%d”,&x,&y,&z); max=x; if(y>max&&y>z) max=y; else if(z>max) max=z; printf(“nThe Greatest Number among %d %d %d is %d”,x,y,z,max); getch(); }

C++ Hotel Management Project

Here you will get C++ hotel management project. This system provides various options like booking a room, checking customer details, editing or deleting any customer, checking all allotted rooms. The project is developed using two important C++ concepts that are classes and file handling. C++ Hotel Management Project #include<iostream.h> #include<conio.h> #include<fstream.h> #include<stdio.h> #include<dos.h> class hotel …

C++ Hotel Management Project Read More »