Question
Write a program, C++, that takes two integer numbers and prints their sum. Do this until the user enters 0 (but print the last sum).
Write a program, C++, that takes two integer numbers and prints their sum. Do this until the user enters 0 (but print the last sum). Additionally, if the user inputs 99 as the first number and 0 as the second number, just print "Finish."and, of course, end the program. Of course use the while loop. Your version of the program must print the same result as the expected output
EXAMPLE:
Input | Output | Input | Output |
1 | sum:2 | 1 | sum:6 |
1 | sum:2 | 5 | sum:99 |
2 | | 99 | Finish. |
0 | | 0 |
Step by Step Solution
3.41 Rating (145 Votes )
There are 3 Steps involved in it
Step: 1
include using namespace std ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Prealgebra
Authors: Elayn Martin Gay
7th edition
321955048, 978-0321955043
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App