java loop problem
GUYS CAN YOU HELP ME ON THIS..?
IT WOULD BE A GREAT HELP ON ME
A program that asks the user for the low and high integer in a range of integers. The program then asks the user for integers to be added up. The program computes two sums:
1.The sum of integers that are in the range(inclusive)
2.The sum of the integers that are outside the range.
The user signals the end of input with a 0.
Low end of range: 20
High end of range: 50
Sum of In range values
Sum of out of range values
What have you done so far?
The core of your solution is supposed to look something like this:
All you have to do is add a bit of riff-raff around this.
if (number >= lo && number <= hi)
Originally Posted by JosAH
can I use the for
will it work?
You might want to re-read Jos's post as the code that you've posted looks as if you're ignoring his suggestions. Time to do some critical thinking on your own here.