imagine a program that reads the population of a city using the following
statements:
System.out.print("Enter the population of the city: ");
int population = keyboard.nextInt( );
Write a while loop after these statements that ensures that population is
positive. if the user enters a population that is either negative or zero, ask
the user to enter a nonnegative value.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here