Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 20th, 2012  |  syntax: None  |  size: 0.76 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /**
  2.  * @(#)Execise2.java
  3.  *
  4.  * Execise2 application
  5.  *
  6.  * @author Aidan Dearing
  7.  * @version 1.00 2010/10/7
  8.  */
  9.  
  10. public class Execise2 {
  11.    
  12.     public static void main(String[] args) {
  13.        
  14.                 int mathTerm1 = 75;
  15.                 int mathTerm2 = 60;
  16.                
  17.                 int finalMath = (mathTerm1 + mathTerm2) / 2;
  18.                
  19.                 if(finalMath > 89)
  20.                 {
  21.                         System.out.println("Your grade is A+");
  22.                 }
  23.                 else if(finalMath > 79)
  24.                 {
  25.                         System.out.println("Your grade is A");
  26.                 }
  27.                 else if(finalMath > 69)
  28.                 {
  29.                         System.out.println("Your grade is B");
  30.                 }
  31.                 else if(finalMath > 59)
  32.                 {
  33.                         System.out.println("Your grade is C");
  34.                 }
  35.                 else if(finalMath > 49)
  36.                 {
  37.                         System.out.println("Your grade is D");
  38.                 }
  39.                 else
  40.                 {
  41.                         System.out.println("Your grade is F");
  42.                 }
  43.     }
  44. }