import java.util.Scanner;
class apples{
public static void main(String args[]){
Scanner Alex = new Scanner(System.in);
int fnum, snum, answer;
System.out.println("Enter your age:");
fnum = Alex.nextInt();
System.out.println("Enter age of your girl:");
snum = Alex.nextInt();
answer = fnum / 2 + 7;
// what if frum % 2 !=0?
// I mean, what if frum is not divisible by 2?
// 7 /2 + 7 = 3 + 7 = 10
// also, lose the ; after your if statement. That is certainly causing an error.
if (answer >= 18);{
System.out.println("Shes good for you");
}else
{
System.out.println("She's not good for you");
}
}
}
Get rid of that ; after the if. That's causing an error.