This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Main Module Declare InitDistance as real Declare WormLength as real Write, "Please enter the initial distance between the worm and the apple:" Input InitDistance Write, "Enter the worm's length" Input WormLength Set Distance = InitDistance While (Distance >= WormLength) Write, "The distance is" Distance Set Distance = Distance - WormLength End loop Write, "The last distance before entering apple is: " Distance End Main Module...
View Full Document
- Spring '10