# Math Program Problem

• 09-24-2012
WulFexe
Math Program Problem
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; }```
• 09-24-2012
std10093
Well this is not a mathematical problem,but i problem with the print operation.Be careful to clearly state what is your problem in order to get fast responses(you will get rid of the delay of the person who is willing to answer to understand what really is the problem).

the solution is
Code:

` cout << firstInt<<" + "<<secondInt<<"  =  " << firstInt + secondInt << endl;`
In order to get the numbers that are going to be added shown,you need to have then without the double quotes.
• 09-24-2012
WulFexe
Thank you very much :D