Question: Write a C program for the following using FOR statement: Assume a range of integer values starting from N1 and ending at N2. Assume also

Write a C program for the following using FOR statement:

Assume a range of integer values starting from N1 and ending at N2. Assume also an integer say M. Write a program that will print and display all the numbers from N1 to N2 which are divisible by M. You are also required display the count of such numbers.

For example, if N1 = 4, N2 = 12 and M = 4, the output will be: 4, 8, 12. The value 3 will also be displayed indicating that there are 3 numbers which are divisible by 4.

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!