54.1k views
4 votes
Write programs with loops that compute

a. the sum of all even numbers between 2 and 100 (inclusive).
b. the sum of all squares between 1 and 100 (inclusive).
c. all powers of 2 from 20 up to 220.
d. the sum of all odd numbers between a and b (inclusive), where a and b are user inputs.
e. the sum of all odd digits of an input. (for example, if the input is 32677, the sum would be 3 + 7 + 7 = 17.)

User Ensnare
by
6.8k points

1 Answer

1 vote
I just need points kid


<3


tysm
User Shalom Sam
by
6.8k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.