Question: Write a code for the function main, that does the steps below. Make sure to use the exact variables names listed: uses a while loop

Write a code for the function main, that does the steps below.
Make sure to use the exact variables names listed:
uses a while loop which runs as long as a variable named Running stores a true value -
think about initialization
inside the while loop, get three integer numbers n1,n2 and n3 from the user - use those
variable names.
if passing those inputs in that order to the function of the previous question results in a
value that is not -1, then add that value to a running sum.
Think about what is need to use a running sum.
Make sure not to call the function of the previous question twice and to save its result in
a variable.
Otherwise make the loop stop by setting the value of Running without using break.
After the loop stops, check the running sum, if it is more than 0, print it; if it is less than
0, print an error message, otherwise if it is 0, print "Wow".
All variables must be initialized.
Call main at the end.
Use conversion or casting functions as needed.
 Write a code for the function main, that does the steps

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!