PDA

View Full Version : True Basic Help: Loops involving counting?


dMack
12-11-2010, 07:25 AM
DO WHILE city$ "HOME"
INPUT PROMPT "What city did you go to?": city$
INPUT PROMPT "How many miles did it take to go there?": miles
INPUT PROMPT "How much was plane fare?": fare
INPUT PROMPT "How much was the hotel?": hotel
INPUT PROMPT "How much was spent at restaurants?": food
LOOP
PRINT miles
LET expenses = (fare + hotel + food)
PRINT expenses
END

That's what I currently have. My goal is to print total expenses and miles however I can't figure out how to make it count rather than display the most recent value.

Thanks for the help!