1. Convert the following while loop to a for loop:
int count = 0;
while (count
{
System.out.println("count is " + count);
count++;
}
2. Convert the following for loop to a while loop:
for (int x = 50; x > 0; x--)
System.out.println(x + " seconds to go.");
3. Write an input validation loop that asks the user to enter a number in the range of 1 through 4.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here