Question: Using for loop, write a C program to find the sum of all numbers divisible by 4 between 1 to n inclusively. n should be

 Using for loop, write a C program to find the sum

Using for loop, write a C program to find the sum of all numbers divisible by 4 between 1 to n inclusively. n should be entered by the user. The program should first print those numbers which are divisible by 4 and then show the summation. For example: If 20 was entered the sum is 60. (4 + 8 + 12 + 16 + 20). Your output should be similar to the following:

Enter the number: 20 48121620 The sum is: 60

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!