This preview shows pages 1–2. Sign up to view the full content.
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 '10