Write a program to scan two numbers and display result of their addition, Subtraction, Multiplication and Division.
WAP to scan two numbers and display result of
their addition, Subtraction, Multiplication and Division.
#
include <iostream>
using namespace std;
int main(){
float a, b, c;
cout
<< "Enter
Number"
<< endl;
cin
>> a;
cout
<< "Enter
Number"
<< endl;
cin
>> b;
c = a + b;
cout
<< "Sum of
Numbers is "<<
c << endl;
c = a - b;
cout
<< "Subtraction
of Numbers is "
<< c << endl;
c = a*b;
cout
<< "Multipaction
of Numbers is "
<< c << endl;
c = a / b;
cout
<< "Division of
Numbers is "
<< c << endl;
system("pause");
return 0;
}
Comments
Post a Comment