Question: C PROGRAMMING ONLY. Do not send in C++ or java Write a program that asks the user for a number n and prints the sum

C PROGRAMMING ONLY. Do not send in C++ or java

Write a program that asks the user for a number n and prints the sum and product of all of the numbers [ 1,n ].

For example, when n = 3, print sum = 6 because 1+2+3 = 6 and product = 6 because 1*2*3 = 6.

Then, modify the program such that multiples of 3 and 5 are not considered when computing the sum and product.

For example, when n = 5, print sum = 7 because 1 + 2 + 4 = 7 and product = 8 because 1*2*4 = 8.

Please make the first program and the modified program separate programs when you post it so I can compare them.

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!