import java.util.Scanner;
public class Challenge028
{
public static void main(String[] args)
{
Scanner scanUserInput = new Scanner(System.in);
System.out.print("Current Grade (%): ");
int n = scanUserInput.nextInt();
if (n >= 70)
if (n >= 80)
if (n >= 90)
System.out.println("Excellent!");
else
System.out.println("Good!");
else
System.out.println("Average.");
else
System.out.println("Bad Times!");
}
}
public class Challenge028
{
public static void main(String[] args)
{
Scanner scanUserInput = new Scanner(System.in);
System.out.print("Current Grade (%): ");
int n = scanUserInput.nextInt();
if (n >= 70)
if (n >= 80)
if (n >= 90)
System.out.println("Excellent!");
else
System.out.println("Good!");
else
System.out.println("Average.");
else
System.out.println("Bad Times!");
}
}
Pasting this code into BlueJ™ will produce the same scenario as in your original blog post.
−Phoenix
Notable strategy in the way you do your range analysis, great work. 50 XPs awarded for this completion.
ReplyDelete