Page 1 of 1

and now it's even easier...

Posted: Thu Aug 31, 2006 1:07 pm
by Stoves

Code: Select all

DIM originalWeight AS DOUBLE, weight AS DOUBLE
DIM milesRanPerDay AS INTEGER, foodsEatenPerDay AS INTEGER
DIM day AS LONG

CLS

INPUT "Current weight (in pounds)"; originalWeight
INPUT "How many miles do you run per day"; milesRanPerDay
INPUT "How much food (in pounds) do you eat per day"; foodsEatenPerDay

CLS

weight = originalWeight
milesRanPerDay = milesRanPerDay + 100
foodsEatenPerDay = 0

PRINT "Here's your diet:"
PRINT "Eat " + LTRIM$(RTRIM$(STR$(foodsEatenPerDay))) + " pounds of food a day."
PRINT "RUN " + LTRIM$(RTRIM$(STR$(milesRanPerDay))) + " miles a day."
easy$ = INPUT$(1)
CLS

day = 0
DO
day = day + 1

CLS
PRINT "Day " + LTRIM$(RTRIM$(STR$(day)))
PRINT "Current Weight: " + LTRIM$(RTRIM$(STR$(INT(weight))))

weight = weight - INT(milesRanPerDay * .05) + INT((foodEatenPerDay - (milesRanPerDay * .02) * .05))

PRINT
PRINT "Running " + LTRIM$(RTRIM$(STR$(milesRanPerDay))) + " miles today";
SLEEP 1
FOR x = 0 TO 3
PRINT ".";
SLEEP 1
NEXT

LOOP UNTIL weight < 1
IF weight < 0 THEN weight = 0

CLS
PRINT "Tadaaaaa! You lost " + LTRIM$(RTRIM$(STR$(originalWeight))) + " pounds in only " + LTRIM$(RTRIM$(STR$(day))) + " days!"
PRINT "You now weigh a lean 0 pounds."
INPUT "Now wasn't that easy"; easy$
PRINT "Shut up. You're dead."
END

Posted: Thu Aug 31, 2006 7:45 pm
by Pete
I read this title and I was sure it was going to be spam. It's nice to be pleasantly surprised!

Posted: Thu Aug 31, 2006 10:10 pm
by sid6.7
ARF!...well it was i just delete the first part...i saw stoves code
i went oh neat....! so left that...

:oops: :D

Posted: Fri Sep 01, 2006 3:02 pm
by {Nathan}
Ohs noes! The spambot ate his soul! :wink: