Answer to Question #258004 in C++ for Kelvin Tito

Question #258004
Using code block/Dev C++, write any TWO types of operators program separately
1
Expert's answer
2021-10-30T00:39:48-0400

Addition operator

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
   int a,b;
   int sum=0;
   cout<<"Enter the value of a and b: ";
   cin>>a>>b;
   sum=a+b;
   cout<<"Sum of the numbers is: "<<sum;
}


Multiplication operator

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
   int a,b;
   int multiply=0;
   cout<<"Enter the value of a and b: ";
   cin>>a>>b;
   multiply=a*b;
   cout<<"Multiplication of the numbers is: "<<multiply;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS