| tilon (1) | |||
Hello,When I enter the number a and b, it just prints the value of b and won't add a and b together to c,where's the problem?
| |||
|
|
|||
| Niven (47) | |
cout << "Addition:" << b << endl;You told it to print out b. Change that to c. | |
|
|
|
| Incis B (92) | |
|
It will produce fictitious results with c is equal to 50. Boundary conditions like this will always screw-up the best programmers. - - --- -- -- -- The other thing which will always foil a good programmer is when she or he uses variable names that don't describe the TYPE or the REASON for their existence; at least they could be i_a, i_b, & i_c ( or i_result) - just saying. | |
|
Last edited on
|
|