So I decided to do a little bit more of programming.
Molly started Weight Watchers again today. I got out her Ti-83+ calculator and wrote a quick program to calculate the points values of stuff.
The code is:
ClrHomeDisp “WELCOME TO MOLLY”
Disp “S WEIGHT WATCHER”
Disp “CALCULATOR”
Disp “”
Disp “PLEASE ENTER:”
Disp “THE FIBER”
Input A
ClrHome
Disp “THE CALORIES”
Input B
ClrHome
Disp “THE FAT”
Input C
ClrHome
Disp “THE POINTS ARE:”
round(B/50+C/12-min(A,4)/5,0)>X
Disp X
It works exactly as desired, and I’m quite happy with it
No comments:
Post a Comment