intermediate/Conditions

From ggc

Jump to: navigation, search

01 package intermediate;
02 
03 
04 /**
05  * All about my application.
06  @author My Name Here
07  */
08 public class Conditions
09 {
10   public static void main(String[] args)
11   {
12     int grade=14;
13     if(grade>=90)
14       System.out.println("You get an A");
15     else if(grade>=80)
16       System.out.println("You get a B");
17     else if(grade>=70)
18       System.out.println("You get a C");
19     else
20       System.out.println("You get a D or F");
21 
22     if(grade>=60)
23     {
24       System.out.println("You pass.");
25     }
26     else
27     {
28       System.out.println("You fail.");
29       if(grade<20)
30       {
31         System.out.println("You really fail");
32       }
33     }
34   }
35 }


Download/View intermediate/Conditions.java





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter