d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Small Basics Help
Add Reply New Topic New Poll
Member
Posts: 20,229
Joined: Apr 4 2010
Gold: 4,590.99
Apr 11 2016 09:38pm
Need help with coding a calorie counter program
will pay in d2 items for your troubles
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Apr 11 2016 09:40pm
what part do you need help with? post what you have.
Member
Posts: 20,229
Joined: Apr 4 2010
Gold: 4,590.99
Apr 11 2016 09:43pm
trying to think of a way to help it run and get user input.

'initialize variables
patientName = "NO NAME"
breakfastFat = 0 'will store the fat grams I've eaten for breakfast
lunchfat = 0


breakfastCarb = 0 'will store the carb for breakfast



'Calculated variables
totalFat = 0 ' will store fat intake
totalCarbs = 0 'will store carb intake
carbCalories=0
fatCalories=0

'Main module
'calls to module
obtainMealData()
calcCalories()
displayData()

'--------------------------
'put modules below
Sub obtainMealData
'take in all 9 variables
EndSub

Sub calcCalories
'calc the totals
totalCarbs = breakfastCarb + lunchCarb ' and so on
totalFat =
carbCalories = totalCarbs * 9
fatCalories
EndSub

Sub displayData
EndSub
Member
Posts: 20,229
Joined: Apr 4 2010
Gold: 4,590.99
Apr 11 2016 10:30pm
close thread pls, I did it ;o
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll