axyd icon

CS172 l2ex17

axyd | PRO | 02/18/16 02:14:17 PM UTC | 0 ⭐ | 734 👁️ | Never ⏰ | []
C++ |

520 B

|

None

|

0 👍

/

0 👎

#include <iostream>
using namespace std;
 
int intex17(){
        int nr1=0, nr2=0, sumtotal=0;
        cout << "\n####Lab 2, Exercise 17####\n";
        cout << "Calculator: Sum of Two Numbers\n\n";
        
        cout << "Enter First Number:" << endl;
        cin >> nr1;
        cout << "\nEnter Second Number" << endl;
        cin >> nr2;
 
        cout << "Press <Enter> after manually trying to solve, to see the answer.\n";
        cin.get();
        cin.ignore();
 
        sumtotal = nr1 + nr2;
        cout << "The sum of both numbers is: "<< sumtotal << endl << endl;
        return 0;
    }

Comments