Arithmetic operation program in C++ (C Plus Plus) – Addition- Subtraction- Multiplication -Division

Arithmetic operation program in C++ (C Plus Plus) – Addition- Subtraction- Multiplication -Division

In this latest tutorial, we will cover the following topics;

  1. Addition in C++
  2. Subtraction in C++
  3. Multiplication in C++
  4. Division in C++

Arithmetic operation program in C++

// all arthmetic operation
#include <iostream>
using namespace std;
int main()
{
int sum,sub,mult,div,module;
int a,b;
cout<<“Enter value of a =”;
cin>>a;
cout<<“Enter value of b =”;
cin>>b;
sum=a+b;
sub=a-b;
mult=a*b;
div=a/b;
module=a%b;
cout<<“sum is =”<<sum<<endl<<“Sub is =”<<sub<<endl<<“mult is =”<<mult<<endl<<“div is =”<<div<<endl<<“module is =”<<module<<endl;
}

Output

Arithmetic operation program in C++ (C Plus Plus) - Addition- Subtraction- Multiplication -Division t4
Figure: Arithmetic operation program in C++ (C Plus Plus) – Addition- Subtraction- Multiplication -Division
Prof. Fazal Rehman Shamil
Researcher, Publisher of International Journal Of Software Technology & Science ISSN: 2616-5325
Instructor, SEO Expert, Web Programmer and poet.
Feel free to contact.