# Programming Shortcut

## Monday, February 4, 2019

### Arithmetic operations in c++ programming

Hello friends! Welcome to my website
How to make a c++ programming for basic arithmetic operations by the simple method?
This c++ language programming is free all type of errors like compiler and runtime errors and this programming is tested to compile and then run the program code.
Here is only programming code only with their output and your programming is easier.

### How to make basic arithmetic operations  in c++ programming

//-----Sart pogramming ------
#include <iostream>
using namespace std;

int main() {
float a, b, add, sub, multi, div;

//Input Frist Number
cout << "Please Enter the Frist number: ";
cin>>a;
//Outout Second Number
cout << "Please Enter the Second number: ";
cin>>b;
//Basic Airthmatic Operation logics
sub = a - b;
multi = a*b;
div = a / b;

//Basic Airthmatic Operations output
cout<<"Airthmatic Operations Result:- "<<endl;
cout << a << " + " << b << " = " << add << endl;
cout << a << " - " << b << " = " << sub << endl;
cout << a << " * " << b << " = " << multi << endl;
cout << a << " / " << b << " = " << div << endl;

return 0;
}
//----- End Programming ------

output:     Please Enter the Frist number: 5
Please Enter the Second number: 4
Airthmatic Operations Result:-
5 + 4 = 9
5 - 4 = 1
5 * 4 = 20
5 / 4 = 1.25

Note: The above c++ programming used float type of variable to store these values and result.
I make this programming and hope you are like the post if are you like the post you can please comment and Share the post to reach more people.