Write a single-file program named maincpp that reads two


Write a single-file program (named main.cpp) that reads two separate integers from the user, adds them together, and then outputs the answer. The program should use three functions: A function named "readNumber" should be used to get (and return) a single integer from the user. A function named "writeAnswer" should be used to output the answer. This function should take a single parameter and have no return value. A main() function should be used to glue the above functions together. Hint: You do not need to write a separate function to do the adding (just use operator+ directly). Hint: You will need to call readNumber() twice. Hint: If you're using visual studio with precompiled headers, don't forget to #include "stdafx.h".

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a single-file program named maincpp that reads two
Reference No:- TGS01145465

Now Priced at $5 (50% Discount)

Recommended (93%)

Rated (4.5/5)