Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Calculator.cpp : Defines the entry point for the console application.
- //
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int
- a, b;
- int
- result;
- cout
- << "Enter your first value: ";
- cin
- >> a;
- cout
- << "You entered "
- << a
- << endl
- << endl;
- cout
- << "Enter your second value: ";
- cin
- >> b;
- cout
- << "You entered "
- << b
- << endl
- << endl;
- result
- = a-b;
- cout
- << a
- << "-"
- << b
- << "="
- << result
- << endl
- << endl;
- system("PAUSE");
- return 0;
- }
Add Comment
Please, Sign In to add comment