Question: Write a program in C with loops that computes: a) The sum of all even numbers between 0 and 10 (inclusive); b) All powers of
Write a program in C with loops that computes:
a) The sum of all even numbers between 0 and 10 (inclusive);
b) All powers of two from 20 to 216 ; and
c) The factorial of all numbers between 1 and 10 (inclusive).
Use formatted output to show the results on the screen.
Here is an example:
-----------------------------------------------------------
The sum of all even numbers between 1 and 10 is 30.
------------------------------------------------------------
2 raised to the power of 0: 1
2 raised to the power of 1: 2
2 raised to the power of 2: 4
...
2 raised to the power of 14: 16384
2 raised to the power of 15: 32768
2 raised to the power of 16: 65536
------------------------------------------------------------
Factorial of 1: 1
Factorial of 2: 2
...
Factorial of 9: 362880
Factorial of 10: 3628800
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
