subject

Write a recursive C++ function, called PrintRevNums, that reads a positive integer number from the keyboard in each call to the function, until a 0 value is entered (base case). In each call the function keeps a running total of the numbers being entered and the current maximum value. After a 0 value is entered, the function outputs the numbers entered in reverse order; such that, each printed number in reverse order has to be followed by a running total of the numbers in reverse order too. At the end, the function should print out the maximum value entered. For example, an input and output dialog might be the following: Enter any sequence of positive numbers, then enter 0 to end: 45 67 32 12 0
12 Total: 156
32 Total: 144
67 Total: 112
45 Total: 45

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Alocal reaction will occur at the site of the exposure such as irritation or damage to the skin eye or local reaction will occur at the site of the exposure such as irritation or damage to the skin ireland lounges
Answers: 3
question
Computers and Technology, 23.06.2019 07:30
What is the original authority for copyright laws
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Which task uses a simple parameter?
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Write a program that asks the user to enter the name of an input file. if the file does not exist, the program should prompt the user to enter the file name again. if the user types quit in any uppercase/lowercase combinations, then the program should exit without any further output.
Answers: 3
You know the right answer?
Write a recursive C++ function, called PrintRevNums, that reads a positive integer number from the k...
Questions
question
English, 24.04.2020 04:29
question
Mathematics, 24.04.2020 04:29
question
Physics, 24.04.2020 04:29
question
Mathematics, 24.04.2020 04:29
Questions on the website: 13722363