I just need some help on one part of my program. I'm supposed to write a task that will tell the user to guess a num and if it's higher than the random generated num then tell the user, lower, and so on... until the user get's it right. I was able to do this fine, but for some reason the while statement is not executing the "You're way too high" or "Way too low" statement when the user is above/below 25 of the num. Any ideas?
PHP Code
<?php
while(flag == false)
{
System.out.print("\n\n\n");
//Input Num
//cornum(Correct Number) is temp variable for guess
System.out.println("Enter Number: ");
int cornum = input.nextInt();
if(cornum == num)
{
System.out.println("You got it: " + num);
flag = true;
flag2 = true;
}
else if (cornum > num)
System.out.println("Too High");
else if (cornum > (num+25))
System.out.println("You're way too High (No Pun Intented)...");
else if (cornum < num)
System.out.println("Too Low");
else if (cornum < (num-25))
System.out.println("You're way too low...");

