Question: for some reason if i enter a year less than 1800 or greater than 2018 it still skips the while loop please help why? int
for some reason if i enter a year less than 1800 or greater than 2018 it still skips the while loop please help why?
int year = sc.nextInt(); while (year < 1800 && year > 2018) { System.out.println("Please input a proper year."); year = sc.nextInt(); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
