Monday, 21 July 2014

Java program to determine Grade

import java.util.*;

class grade
   public static void main(String args[])
      int n, m;
      System.out.println("Enter your name:- ");
      Scanner scanner = new Scanner(;
      String name = scanner.nextLine();
      System.out.println("Enter your Class ");
      Scanner in = new Scanner(;
      n = in.nextInt();
      System.out.println("Enter your Marks ");
      Scanner out = new Scanner(;
      m = in.nextInt();
      if (m>100){System.out.println("Please enter your Actual marks -.- -.-");}
      else if(m>=80){System.out.println("Congrats You Got A Grade");}    
      else if (m>=70){ System.out.println("Congrats You Got B Grade");}
      else if (m>=60){System.out.println("WorkHard! You Got C Grade");}
      else if (m>=50){System.out.println(" Improve Yourself!! You Got D Grade");}
      else if (m>=40){System.out.println(" Improve! You Got E Grade");}
      else if (m<40) {System.out.println("Sorry You Have Failed");}

1 comment:

  1. Find Commercial Real Estate Property. get details of Farm lands and Lands property, Incredible Lands is the leading Real Estate Company in Hyderabad
    Farm Land in Hyderabad

    Farm Land for Sale

    Lands in Hyderabad

    Investment in Land