Guest User

Untitled

a guest
Jan 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. // Calculator.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include <iostream>
  5. #include <cstdlib>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.     int
  12.         a, b;
  13.  
  14.     int
  15.         result;
  16.  
  17.     cout
  18.         << "Enter your first value: ";
  19.  
  20.     cin
  21.         >> a;
  22.  
  23.     cout
  24.         << "You entered "
  25.         << a
  26.         << endl
  27.         << endl;
  28.  
  29.     cout
  30.         << "Enter your second value: ";
  31.  
  32.     cin
  33.         >> b;
  34.  
  35.     cout
  36.         << "You entered "
  37.         << b
  38.         << endl
  39.         << endl;
  40.  
  41.     result
  42.         = a-b;
  43.  
  44.     cout
  45.         << a
  46.         << "-"
  47.         << b
  48.         << "="
  49.         << result
  50.         << endl
  51.         << endl;
  52.  
  53.     system("PAUSE");
  54.  
  55.     return 0;
  56. }
Add Comment
Please, Sign In to add comment