Write a program and ask the user to input two number, and print sum, difference, and product of numbers
//Write a program to user input two number
// do maths operation
#include<iostream>
using namespace std;
int main()
{
int a,b; // a and b are two number
cout<<"Enter first Number :";
cin>>a;
cout<<"Ente second number :";
cin>>b;
cout<<"Sum of two number is : "<<a+b<<endl;
cout<<"Difference of two number is:"<<a-b<<endl;
cout<<"Product of two number is :"<<a*b<<endl;
return 0;
}
Enter first Number :2 Ente second number :3 Sum of two number is : 5 Difference of two number is:-1 Product of two number is :6
0 Comments
If you have any doubt and suggestion Please let me know