I need to use a while loop to ask the user for a number that is between 1-100, and tell the user that they entered the wrong number if they enter any number that is negative or over 100. Here is what I have so far. Whenever I run it, it asks for the user's input. When the input is negative or above 100 it says invalid number, yet when the user input is 45, it still says invalid number, when a number between 0-100 is valid. I don't think its reading the last part of the code.
import java.util.*;
public class PlayOffs {
public static Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
System.out.print("What is the % chance Team 1 will win (1-99)?: ");
int team1input = scan.nextInt();
do {
while (team1input >= -1 || team1input >= 101) {
System.out.println("That's not between 1-99");
scan.next(); // this is important!
}
team1input = scan.nextInt();
} while (team1input >= 0 && team1input <= 100);
System.out.println("Thank you! Got " + team1input);
}
}