jam/DefensiveProgram

From ggc

Jump to: navigation, search

01 package jam;
02 
03 import wiki.Wiki;
04 /**
05  * All about my application here.
06  @author Jam Jenkins 
07  */
08 public class DefensiveProgram
09 {
10   public static void main(String[] args)
11   {
12     int sum=1+0+1+1+0;
13     double average=sum/5;
14     if(average*5!=sum)
15       Wiki.out.println("Something went wrong!");
16     Wiki.out.print("The average is "+average);
17     Wiki.out.println("The average is "+average);
18   }
19 }


Download/View jam/DefensiveProgram.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