Created
November 8, 2015 18:10
-
-
Save nalin-adh/d0383b46be7ccaddeca9 to your computer and use it in GitHub Desktop.
A C++ program that reads two numbers and find sum, difference, product and division.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<conio.h> | |
using namespace std; | |
int main() | |
{ | |
float a,b,sum=0.00,diff=0.00,pro=0.00,div=0.00; | |
cout<<"Number a = "; | |
cin>>a; | |
cout<<endl; | |
cout<<"Number b= "; | |
cin>>b; | |
sum=a+b; | |
diff=a-b; | |
pro=a*b; | |
div=a/b; | |
cout<<endl<<endl; | |
cout<<a<<" + "<<b<<" = "<<sum<<endl; | |
cout<<a<<" - "<<b<<" = "<<diff<<endl; | |
cout<<a<<" * "<<b<<" = "<<pro<<endl; | |
cout<<a<<" / "<<b<<" = "<<div<<endl; | |
getch(); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment