View Single Post
variable equal to 0
Status: Offline
Posts: 168
Join Date: Jan 2007
Default variable equal to 0 - 01-21-2013, 09:18 AM

Set up a while loop... Assume you have a distance variable and a speed variable... Also comparing a variable for equality to zero is very difficult when dealing with real numbers, and so I am going to assume a minimum speed and minimum distance value that the user has to enter.

while (either speed < 1 or distance < 1 or both)
ask user for speed
ask user for distance

The functions and operators you are looking for are in world functions tab

See the attached screen shot
Attached Images
File Type: jpg mimimumValue.jpg (12.7 KB, 14 views)

Don Slater
Alice Team
Carnegie Mellon University
Reply With Quote