Question: Complete the following programs using loops in Raptor Part I Using Raptor create a program that will find and display the largest of a list

Complete the following programs using loops in Raptor

Part I Using Raptor create a program that will find and display the largest of a list of positive numbers entered by the user. The user should indicate that he/she has finished entering numbers by entering a 0. Hint: Create a loop that keeps accepting a number and then compares it with the number entered previously and only keeping the number that is larger.

Part II A meteorologist needs to evaluate the average rain fall of two months. You need to create a program that asks you the name of the month and then rainfall in 4 weeks of the month and then outputs the average rainfall for that month. Hint: The outer loop allows to input two names of the month and the inner loop should accept the four numbers for the rainfall of the 4 weeks.

I. Input a list of people's ages from the user. Stop the input as soon as the user enters 0. Find the average age. be sure to check that the user enters a positive integer.

II. Help users calculate their car's miles per gallon. Write a program to allow a user to enter the number of miles driven and the number of gallons of gas used. The output should be the miles per gallon. Use a loop to allow the users to enter as many sets of data as desired.

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!