C++ Programming Code Examples C++ > Beginners Lab Assignments Code Examples ask to the user to enter the two number along with operator to perform particular operation ask to the user to enter the two number along with operator to perform particular operation (addition, subtraction, multiplication and division) according to the user: To perform addition, subtraction, multiplication and division of any two numbers in C++ Programming, you have to ask to the user to enter the two number and then ask to enter the operator to perform the particular mathematical operation (addition, subtraction, multiplication, and division) and display the result on the screen. #include<iostream.h> #include<conio.h> void main() { clrscr(); int a, b; char ch; cout<<"Enter first Number :"; cin>>a; cout<<"Enter second Number :"; cin>>b; cout<<"Enter operator (+, -, *, /) :"; cin>>c); if(ch=='+') cout<<"Result = "<<a+b; else if(ch=='-') cout<<"Result = "<<a-b; else if(ch=='*') cout<<"Result = "<<a*b; else if(ch=='/') cout<<"Result = "<<a/b; else cout<<"Wrong Operator!!!"; getch(); }