Arithemetic operators

Description:

Write program for different working of operator in sequence :+,-,*,/,%,++,--. Test Case 1 Input (stdin) 5 2 Expected Output 7 3 10 2 1 5 6 Test Case 2 Input (stdin) 5 3 Expected Output 8 2 15 1 2 5 6

Program :


#include <iostream>

#include <math.h>

using namespace std;

int main()

{

int a,b;

  cin>>a>>b;

  cout<<a+b<<"\n";

  cout<<a-b<<"\n";

  cout<<a*b<<"\n";

  cout<<a/b<<"\n";

  cout<<a%b<<"\n";

  cout<<a++<<"\n";

  cout<<a--;

 

return 0;

}