Created
February 2, 2016 17:56
-
-
Save batmantec/1dc384374e1c16f8813c to your computer and use it in GitHub Desktop.
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> | |
using namespace std; | |
int main (){ | |
float num1, num2, sum, rest, mult, divi; | |
cout << "Please enter the first number (calculate the addition, subtraction, product, and division): "; | |
cin >> num1; | |
cout << "Please enter the second number (calculate the addition, subtraction, product, and division): "; | |
cin >> num2; | |
sum=(num1+num2); | |
rest=(num1-num2); | |
mult=(num1*num2); | |
divi=(num1/num2); | |
cout << "The addition is: "<<sum<<endl; | |
cout << "The subtraction is: "<<rest<<endl; | |
cout << "The product is: "<<mult<<endl; | |
cout << "The division is: "<<divi<<endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment