Pages

Wednesday, 21 February 2018

Arithmetic Operator Example in C ++ Programming Language

Arithmetic Operator Example in C ++ Programming Language

#include <iostream>
using namespace std;
int main(){
  int num1 = 240;
  int num2 = 40;
  cout<<"num1 + num2: "<<(num1 + num2)<<endl;
  cout<<"num1 - num2: "<<(num1 - num2)<<endl;
  cout<<"num1 * num2: "<<(num1 * num2)<<endl;
  cout<<"num1 / num2: "<<(num1 / num2)<<endl;
  cout<<"num1 % num2: "<<(num1 % num2)<<endl;
  return 0;

}