package gradingsystem;
import java.util.Scanner;
/**
*
* @author anfal
*/
public class GradingSystem {
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
//prompt user to input mark
System.out.print("Please input your mark: ");
//declare and read mark
int mark = input.nextInt();
//check mark and print grade accordingly
if (mark >= 90)
{
System.out.println("Congratulations! your grade is A ☺");
}
if (mark >= 80)
{
System.out.println("Your grade is B");
}
if (mark >= 70)
{
System.out.println("Your grade is C");
}
if (mark >= 60)
{
System.out.println("Your grade is D");
}
else
System.out.println("Your grade is F ☹");
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.