0
Can someone help me find the problem in this code? Thank you!
3 ответов
+ 3
public class Program
{
public static void main(String[] args) {
int a=(100);
if(a<900){System.out.println("You're under 900");}
else if(a<800){System.out.println("Youre under 800");}
else if(a<101){System.out.println("just barely under 101");}
else if(a>50){System.out.println("over 50");}
}
}
This works. You didn't declare a variable so I added a. You referenced int within your if statements and it should have been your variable. You used Program in place of System and Println instead of println for your output lines. You're semicolons need to be before the } instead of after.
Your not going to be happy with your output.
0
as John said, and here's the code