This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Display "Enter the worm's length" Input Worm_Length //cut the distance between the worm and apple by the worm's body length //until the worm is close enough to enter the apple Set Distance = Initial_Distance while (Distance >= Worm_Length) //loops until worm is within body length of apple Display "The distance is" Distance Set Distance = Distance - Worm_Length end loop //print final distance before entering the apple Display "The last distance before entering apple is: " Distance End Main Module...
View Full Document
- Spring '11
- Distance, Ring, Control flow