Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

Students also viewed these Databases questions

Question

Write an effective news release.

Answered: 1 week ago