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 (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.