Advertisement
axyd

CS172 l2ex17

Feb 18th, 2016
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int intex17(){
  5.         int nr1=0, nr2=0, sumtotal=0;
  6.         cout << "\n####Lab 2, Exercise 17####\n";
  7.         cout << "Calculator: Sum of Two Numbers\n\n";
  8.        
  9.         cout << "Enter First Number:" << endl;
  10.         cin >> nr1;
  11.         cout << "\nEnter Second Number" << endl;
  12.         cin >> nr2;
  13.  
  14.         cout << "Press <Enter> after manually trying to solve, to see the answer.\n";
  15.         cin.get();
  16.         cin.ignore();
  17.  
  18.         sumtotal = nr1 + nr2;
  19.         cout << "The sum of both numbers is: "<< sumtotal << endl << endl;
  20.         return 0;
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement