View Single Post
  #6   Spotlight this post!  
Unread 21-02-2005, 17:58
DarkJedi613's Avatar
DarkJedi613 DarkJedi613 is offline
Running Riot
AKA: Patrick Cloke
FRC #0358 (Hauppauge Robotic Eagles) FRC #1493 (RPI/Albany High School)
Team Role: Mentor
 
Join Date: Feb 2003
Rookie Year: 2003
Location: Hauppauge, N.Y.
Posts: 455
DarkJedi613 is a splendid one to beholdDarkJedi613 is a splendid one to beholdDarkJedi613 is a splendid one to beholdDarkJedi613 is a splendid one to beholdDarkJedi613 is a splendid one to beholdDarkJedi613 is a splendid one to beholdDarkJedi613 is a splendid one to behold
Send a message via AIM to DarkJedi613 Send a message via MSN to DarkJedi613 Send a message via Yahoo to DarkJedi613
Re: Teach Genia How to Program and Win a Prize

heres a simple loop

Code:
1 int amountOfLoops = 0;
2 while (amountOfLoops <= 100) {
3     amountOfLoops++; //adds one to amountOfLoops
4     System.out.println(amountOfLoops); //outputs amountOfLoops to screen
5 }
1 - Defines the variable amountOfLoops (which is just the name) as an integer equal to zero.
2 - Conditional statement saying that if amountOfLoops is less then or equal to 100 do what is within the brackets.
3 - "Increment" amountOfLoops, which just means add one to it.
4 - Prints the variable amountOfLoops to the screen (i.e. it would do 1 2 3 4 etc.).
5 - End Loop
__________________
2003 - 2006 President, Coach, Webmaster Team358.org
2008 Mentor, Team 1493

Team Search | (Updated: 1-16-08)

FIRSTsearch

Last edited by DarkJedi613 : 21-02-2005 at 18:24. Reason: Clarification
Reply With Quote