Iteration Control Structure

Iteration Control Structure - variable body_length \\ the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Processes 1. Get User Input 2. Get Distance to Apple 3. Get Length of Worm Input 1. Distance to Apple (real: 0-1000) 2. Length of Worm (real: 0-1000) Output 1. Number of Movements (real: 0-1000) Pseudocode variable distance \\distance to the apple variable count \\ count the moves of the worm towards the apple
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: variable body_length \\ the length of the worm input distance Display {The distance between the worm and apple is “ “.} Input body_length Display {The worm’s length is “ “.} while (distance >= body_length){ distance = distance - body_length count = count +1 }...
View Full Document

This note was uploaded on 05/20/2011 for the course IT 210 taught by Professor Josephpillera during the Spring '10 term at University of Phoenix.

Ask a homework question - tutors are online