How do I get the highlighted part in the to say the integer #? I want it to say 17 + 5 = 22 instead of it saying firstInt + secondInt = 22. Can anyone help me?
http://img710.imageshack.us/img710/9085/cscproblem.png
Code:// ******************************** #include <iostream> #include <cmath> #include <cstdlib> #include <string> using namespace std; int main () { int x, y, firstInt, secondInt; cout << "Hello I'm an arithmetic wizard. I can perform the following" " arithmetic operations on a pair of integars" << endl; cout << endl; cout << "Addition" << endl; cout << "Subtraction" << endl; cout << "Multiplication" << endl; cout << "Division" << endl; cout << "Modulus" << endl; cout << endl; cout << "Please enter your integers" << endl; cout << endl; cout << "First Integer >> "; cin >> firstInt; cout << endl; cout << "Second Integer >> "; cin >> secondInt; cout << endl; cout << "firstInt + secondInt = " << firstInt + secondInt << endl; cout << endl; cout << "firstInt - secondInt = " << firstInt - secondInt << endl; cout << endl; cout << "firstInt * secondInt = " << firstInt * secondInt << endl; cout << endl; cout << "firstInt / secondInt = " << firstInt / secondInt << endl; cout << endl; cout << "firstInt % secondInt = " << firstInt % secondInt << endl; cout << endl; system("pause"); return 0; }



LinkBack URL
About LinkBacks


