Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This is an addition calculator that adds two values choosen by the user.
- #include <iostream>
- using namespace std;
- int main()// All instructions encapsulated inside main.
- {
- cout << "Addition Calulator initiated \n"; // Verify's program has started correctly.
- cout << "\n";
- //Declaring the variables
- int x;
- int y;
- // Method to add a number with values chosen by the user.
- cout << "Choose the first number: "; cin >> x;
- cout << "\n";
- cout << "Value Entered:" << x;
- cout << "\n";
- cout << "\n";
- cout << "Choose the second Number: "; cin >> y;
- cout << "\n";
- cout << "Value Entered:" << y;
- cout << "\n";
- cout << "\n";
- cout << "Solution for addition: "; cout << x + y << endl;
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement