Question: Write a C-program that asks the user to enter two numbers (integers). The first integer should be considered the low value and the second integer

Write a C-program that asks the user to enter two numbers (integers). The first integer should be considered the low value and the second integer the high value of a range. The program should loop through all the integers between the low and high values. The loop should include the low and high integers. The program must calculate and/or display the following:

1. Calculates and displays the number of integers in the range.

2. Displays the number of integers divisible by 5 OR 6, but not both.

3. Displays the sum of the integers from condition 2 as well as the sum of all the integers.

4. Displays the largest integer and the smallest integer that satisfy condition number 2.

5. Computes the average of the largest and smallest integer. Use two decimal point precision for the average.

6. Verifies that the first number is smaller than the second number and will continue to ask the user for the numbers until the user corrects the problem.

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!