Question: Write a program that finds ( i ) the multiplication of a set of user - given integers, and ( ii ) the total number

Write a program that finds (i) the multiplication of a set of user-given integers, and (ii) the total number of elements that are divisible by 3 in that given set of integers. Your program should keep accepting integers from the user until they enter a sentinel value (e.g.,-1 to stop). The program will then calculate and display: 1. The multiplication of all the user-given integers (excluding the sentinel value).2. The total number of integers that are divisible by 3 in that set. Make sure to handle cases where no valid integers are entered before the sentinel. Use a while loop to continuously prompt the user for input until the sentinel value is provided.

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!