C++ Programming Code Examples C++ > Mathematics Code Examples Addition Subtraction Multiplication Division Addition Subtraction Multiplication Division 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. Following C++ program ask to user to enter the two number and perform addition, subtraction, multiplication and division on the two entered number: /* C++ Program - Addition, Subtraction, Multiplication, Division */ #include<iostream.h> #include<conio.h> void main() { clrscr(); int a, b, res; cout<<"Enter two number :"; cin>>a>>b; res=a+b; cout<<"\nAddition = "<<res; res=a-b; cout<<"\nSubtraction = "<<res; res=a*b; cout<<"\nMultiplication = "<<res; res=a/b; cout<<"\nDivision = "<<res; getch(); }