Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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: 60Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started