Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- float firstnum, secondnum, result;
- cout << "Please enter your first number: ";
- cin >> firstnum;
- cout << "Please enter your second number: ";
- cin >> secondnum;
- result = firstnum / secondnum;
- cout << firstnum << " / " << secondnum << " = " << result << endl;
- }
- Result:
- Please enter your first number: 9
- Please enter your second number: 2
- 9 / 2 = 4.5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement