Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- int 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: 10
- Please enter your second number: 15
- 10 + 15 = 25
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement