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, 24.06.2019 21:40
Clunker motors inc. is recalling all vehicles in its extravagant line from model years 1999—2002 as well as all vehicles in its guzzler line from model years 2004—2007. a boolean variable named recalled has been declared. given a variable modelyear and a string modelname, write a statement that assigns true to recalled if the values of modelyear and modelname match the recall details and assigns false otherwise.
Answers: 2
question
Computers and Technology, 25.06.2019 05:10
Create a console project in c#. 1. create an interface "imyinterface.cs" - add a method "string imessage()" 2. create a class named "c1.cs" - add 4 private data members, create property for each data member double loanamnout=0.0; double years=0.0; double interests=0.0; double interestrate=0.0; 3. - add a constructor with parameters to assign values to loanamnout, years, interestrate with values that user entered. 4. - add one method “payinterests()” to return the interests interests = loanamnout * interestrate * years 5. - inheritate "imyinterface", implement the method " imessage()", return string "be ready! ” 6. in program.cs, have users to enter loanamnout, years, interestrate. - call method payinterests() to display total interests. - call imessage() to display "be ready! ”
Answers: 3
question
Computers and Technology, 25.06.2019 06:00
Shaniya has misspelled a scientific name in her biology report. she needs to correct it, but she has no access to a computer. she plans to use the word app on her phone without an office 365 subscription. can shaniya correct her mistake? why or why not? yes, she can navigate the window and do simple editing. yes, she can use this application for free and navigate the window. no, her document is “read-only,” so she cannot navigate the window. no, her application has limited features and she cannot access the documen
Answers: 1
question
Computers and Technology, 25.06.2019 19:40
Determine if the given system is consistent. do not completely solve the system.
Answers: 1
You know the right answer?
Write a recursive C++ function, called PrintRevNums, that reads a positive integer number from the k...
Questions
question
Computers and Technology, 03.12.2021 01:00