Arithmetic operations in c++ programming

  • on February 4, 2019
  • Likes!
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

#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
add = a + b;
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;
}
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.
If any dought about this c++ programming code or input & output please comment below
If you have other question about c++ programming send an email by contacting us form are given on page right side.
Thank You!

Article Categories:
Programs in cpp

Leave a Reply

Your email address will not be published. Required fields are marked *