Вы находитесь на странице: 1из 3

Code:

import java.util.Scanner;
public class gradeResults {

public static void main(String[] args) {

double grade;

Scanner keyboard = new Scanner(System.in);

System.out.println("Welcome to the WhAt Do ThEsE NuMbErS oN mY tEsT MeAn?!?


Calculator! \n"
+ "Enter the number grade of whatever assingment you have and \n"
+ "this calculator will convert that into a letter grade. \n"
+ "In Addition, each letter grade comes with a handy note \n"
+ "to tell exactly what that grade means. ");
grade = keyboard.nextDouble();

if(grade < 60)


{
System.out.println("You got an F \n"
+ "That means you succeding at absolutely failing! \n"
+ "Good Job :D");
}
else
{
if(grade < 70)
{
System.out.println("You got a D \n"
+ "That means you didn't succeed, \n"
+ "but you didn't TOTALLY fail, just partly.");
}
else
{

if(grade < 80)


{
System.out.println("You got a C \n"
+ "it to believe it! \n"
+ "... \n"
+ "Yeah that wasn't too great.");
}
else
{
if(grade < 90)
{
System.out.println("You got a B \n"
+ "You either wish you got an A, \n"
+ "Or you are happy you didn't get a C.");
}
else
{
System.out.println("You got an A! \n"
+ "You succeded and can now proceed to,
\n"
+ "make six figures or something... \n"
+ "I dont know.");
}
}
}
}
System.exit(0);
}
}

Le Output!
Welcome to the WhAt Do ThEsE NuMbErS oN mY tEsT MeAn?!? Calculator!
Enter the number grade of whatever assingment you have and
this calculator will convert that into a letter grade.
In Addition, each letter grade comes with a handy note
to tell exactly what that grade means.
23.6
You got an F
That means you succeding at absolutely failing!
Good Job :D

Вам также может понравиться