Question: 7. Write a program that prompts the user for a positive integer n between 10 and 100 and then prints the sum of the

7. Write a program that prompts the user for a positive integer n between 10 and 100 and then prints the sum 8. Write a program that prompts the user to enter 3 integers and then prints the current average, displayed

7. Write a program that prompts the user for a positive integer n between 10 and 100 and then prints the sum of the integers that are evenly divisible by 4 or 6, but not both, from 1 to n. Input validation is required. See the example below. Remember to include everything that is needed such as imports, classes, and the main method. Enter a positive integer between 10 and 100: 5 The number you entered is invalid. Try again. Enter a positive integer between 10 and 100: 20 The sum is 72. 8. Write a program that prompts the user to enter 3 integers and then prints the current average, displayed to 2 decimal places, of the numbers that were inputted at that time for each user input using a loop statement. Input validation is not required. See the example below. Remember to include everything that is needed such as imports, classes, and the main method. Hint: Use printf("%.2f", num) to display num to 2 decimal places. Enter an integer number: 5 After 1 number(s), the average is 5.00. Enter an integer number: 6 After 2 number(s), the average is 5.50. Enter an integer number: 10 After 3 number(s), the average is 7.00.

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 Programming Questions!