I need help writing a function that would calculate out which Protein, fat, carbohydrate and combine to know how much to eat of each to reach your daily intakes.
Basically a person will tell you the info what they weigh how much the train etc.
Only need that part of the function:
That give you for example that you need as intake
Vi använder dessa råvaror: Protein / g Fat / g Carbonhydrate / g kcal / g
Proteinsource: salmon 0,18 0,12 0,00 1,8
Carbonhydratesource: Couscous 0,13 0,01 0,72 3,6
Fatsource: Pesto 0,13 0,54 0,04 5,5
Proteinpouder One Whey 0.78 0.05 0.11 4
The thing is, it needs to work with thousands of different items thats states the information about protein, fat, carbohydrate.
Depends on which your daily intake is the numbers of protein, fat, carbynhydrate will not be allow to pass that bar or go less then the stated intake you got. (max 3%)
So whatever you your daily intake will be you will be able to choose what your source are