G
gajo
I have this code:
int i = -5;
while ((i<0) & (i>=100))
i = Integer.parseInt(stdin.readLine());
// stdin is a BufferedReader
It's supposed to repeatedly read the users input until the user types a
number between 0 and 100. However, whenever I start the program it accepts
that i=-5 and an error occurs because of this.
Why?
Gajo
int i = -5;
while ((i<0) & (i>=100))
i = Integer.parseInt(stdin.readLine());
// stdin is a BufferedReader
It's supposed to repeatedly read the users input until the user types a
number between 0 and 100. However, whenever I start the program it accepts
that i=-5 and an error occurs because of this.
Why?
Gajo