{ loopy.p Started by Jeff Ondich on 1/6/97 Last modified 1/6/97 This program demonstrates a simple "while" loop. 1. Compile and run this program. Yee-hah! Take a look at the "while" loop and see if you can make sense out of how it works. 2. What do you expect to happen if you leave out the "i := i + 1" line? Try removing that line, saving, recompiling, and executing. Were you right? (By the way, you can stop a program running out of control by typing a CTRL-C. That is, hold down the CTRL key while typing C.) 3. Put the i:=i+1 back in. What do you expect to happen if remove the "i := 1" line? Try it and see. 4. Try changing the program to deliver only odd-numbered greetings. Then try delivering only even-numbered greetings. 5. A little terminology. } program loopy(input,output); var nGreetings, i : integer; begin write( 'How many greetings do you want? ' ); readln( nGreetings ); i := 1; while i <= nGreetings do begin writeln( 'Howdy #', i ); i := i + 1 end end.