C++ Program to add subtract multiply and divide two numbers

ad+1




Program:


// Program By http://solutionscpp.blogspot.com
// Author Mansoor Ahmed
// GMail ID: secguy000@gmail.com

#include<iostream>
using namespace std;

int main()
{

   int a=0, b=0, add=0, sub=0, mult=0, div=0;
  
   cout<<"Enter 1st number: ";
   cin>>a;
  
   cout<<"Enter 2nd number: ";
   cin>>b;
  
   add=a+b;
   sub=a-b;
   mult=a*b;
   div=a/b;
  
   cout<<"Addition of two numbers are: " <<add <<endl;
   cout<<"Subtraction of two numbers are: " <<sub <<endl;
   cout<<"Multiplication of two numbers are: " <<mult <<endl;
   cout<<"Division of two numbers are: " <<div <<endl;
 
  return 0;
 
 }






Output:



5 comments: Leave Your Comments