scg/ch08/NotFromOneFixed

From FANG

Jump to: navigation, search

01 package scg.ch08;
02 
03 import fang2.core.Game;
04 
05 /** Iteration demonstration */
06 public class NotFromOneFixed
07   extends Game {
08   /**
09    * 10-100, 7 per line all but last
10    */
11   @Override
12   public void setup() {
13     int numberPrintedSoFar = 0;
14     for (int = 10; i != 100++i{
15       if (((numberPrintedSoFar % 7== 0&&
16           (numberPrintedSoFar != 0)) {
17         System.out.println();
18       }
19       System.out.print(" " + i);
20       ++numberPrintedSoFar;
21     }
22     System.out.println();
23   }
24 }
25 
26 //Uploaded on Mon Mar 29 21:40:17 EDT 2010


Download/View scg/ch08/NotFromOneFixed.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

Games
Games