Here I have another one:
The program that should first read in two values from the keyboard, a starting value and an ending value. It should sum all the even numbers between those two values including the endpoints and display the sum. If the ending point is less than the starting point, the sum should be 0.
A sample dialog for this program looks as follows:
Enter starting and ending: 12 15
Sum of evens = 26
The loop that is required in this program is a counter-controlled loop, which is an example of definite iteration.
it is easy to see which are even and which are odd numbers but i do not know how i store all the even numbers. I know how to store one in a variable but they are more.
I just need just a hint to know what to think about.
thanks