Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Add Ingredients' Nutrition Facts?

add ingredients nutrition facts recipe result

  • Please log in to reply
3 replies to this topic

#1 RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1311 posts
  • Location:C:\Countries\US
  • Programming Language:C, Java, C++, PHP, Python, JavaScript

Posted 19 April 2012 - 06:21 PM

Hello.

I was thinking of writing a program that would calculate the nutrition facts for a recipe, based on the nutrition facts (and quantities) of the ingredients.

My question is: do I just add all the quantities of the nutrition facts of the ingredients together to get the facts for the result, or is there some different formula?

In other words, if one ingredient has 4 mg of whateveritis and the other ingredient has 7 mg of whateveritis, then would the resulting product of the recipe have 11 mg of whateveritis?

And would this be for any kind of recipe (i.e. same for cooking, baking, etc.)?
  • 0
Regards,
RR

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 20 April 2012 - 07:55 AM

In general, just add. However, there are chemical reactions that occur when you cook food, so Calorie values, and other things, can change. For example, fiber content can go down while cooking as heat breaks it down.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1311 posts
  • Location:C:\Countries\US
  • Programming Language:C, Java, C++, PHP, Python, JavaScript

Posted 20 April 2012 - 10:12 AM

Is there a good way to test the result for the amounts of different nutrients?
  • 0
Regards,
RR

#4 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 21 April 2012 - 04:20 AM

I have no idea. Sorry.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/






Also tagged with one or more of these keywords: add, ingredients, nutrition facts, recipe, result

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download