Nama Bahan | Protein (%) | Karbohidrat (%) | Lemak (%) | Kadar air (%) |
A | 46 | 0 | 5,5 | 2,9 |
B | 0,4 | 91 | 0,5 | 7 |
C | 34 | 36 | 18,1 | 8 |
D | 42 | 0 | 1,5 | 40 |
E | 63 | 73,69 | 2,66 | 12 |
cari lah komposisi sehingga hasil racikan akan memiliki kandungan Protein antara 20-40%, Karbohidrat 70-90%, Lemak 4-5%, dan kadar air 11-13%.
maka hasil dari script tersebut adalah sebagai berikut :
Protein 20%, Karbohidrat 70%, Lemak 4%, Kadar Air 11% SI-01 : = 0,349978364436993 gr SI-02 : = 57,4457789794849 gr SI-03 : = 17,3479478180771 gr SI-04 : = 9,27876747450392 gr SI-05 : = 15,5775273634971 gr Protein 21%, Karbohidrat 70%, Lemak 4%, Kadar Air 11% SI-01 : = 0,402315817457534 gr SI-02 : = 56,029736655729 gr SI-03 : = 17,1200562044205 gr SI-04 : = 9,0103565012568 gr SI-05 : = 17,4375348211362 gr Protein 22%, Karbohidrat 70%, Lemak 4%, Kadar Air 11% SI-01 : = 0,454653270477991 gr SI-02 : = 54,6136943319731 gr SI-03 : = 16,892164590764 gr SI-04 : = 8,74194552800971 gr SI-05 : = 19,2975422787752 gr Protein 23%, Karbohidrat 70%, Lemak 4%, Kadar Air 11% SI-01 : = 0,506990723498561 gr SI-02 : = 53,1976520082172 gr SI-03 : = 16,6642729771074 gr SI-04 : = 8,47353455476255 gr SI-05 : = 21,1575497364143 gr Protein 24%, Karbohidrat 70%, Lemak 4%, Kadar Air 11% SI-01 : = 0,559328176519173 gr SI-02 : = 51,7816096844613 gr SI-03 : = 16,4363813634508 gr SI-04 : = 8,20512358151538 gr SI-05 : = 23,0175571940534 gr Protein 25%, Karbohidrat 70%, Lemak 4%, Kadar Air 11% SI-01 : = 0,611665629539544 gr SI-02 : = 50,3655673607054 gr SI-03 : = 16,2084897497942 gr SI-04 : = 7,93671260826838 gr SI-05 : = 24,8775646516924 gr Protein 26%, Karbohidrat 70%, Lemak 4%, Kadar Air 11% SI-01 : = 0,664003082560029 gr SI-02 : = 48,9495250369495 gr SI-03 : = 15,9805981361377 gr SI-04 : = 7,66830163502129 gr SI-05 : = 26,7375721093315 gr Protein 27%, Karbohidrat 70%, Lemak 4%, Kadar Air 11% SI-01 : = 0,716340535580613 gr SI-02 : = 47,5334827131936 gr SI-03 : = 15,7527065224811 gr SI-04 : = 7,39989066177413 gr SI-05 : = 28,5975795669706 gr Protein 28%, Karbohidrat 70%, Lemak 4%, Kadar Air 11% SI-01 : = 0,768677988601084 gr SI-02 : = 46,1174403894378 gr SI-03 : = 15,5248149088245 gr SI-04 : = 7,13147968852704 gr SI-05 : = 30,4575870246096 gr Protein 29%, Karbohidrat 70%, Lemak 4%, Kadar Air 11% SI-01 : = 0,821015441621597 gr SI-02 : = 44,7013980656819 gr SI-03 : = 15,2969232951679 gr SI-04 : = 6,86306871527996 gr SI-05 : = 32,3175944822487 gr Protein 30%, Karbohidrat 70%, Lemak 4%, Kadar Air 11% SI-01 : = 0,873352894642153 gr SI-02 : = 43,285355741926 gr SI-03 : = 15,0690316815113 gr SI-04 : = 6,59465774203279 gr SI-05 : = 34,1776019398878 gr
dan seterusnya. Screenshot programnya seperti berikut
Model-mencari-komposisi-bahan |
Massa Total : {100}{gr} Kandungan : {Protein} {Karbohidrat} {Lemak} {Kadar Air} Batas Kandungan : {20-40} {70-90} {4-5} {11-13} (satuan %) Langkah Pengecekan : {1} {1} {0,5} {1} SI-01 : {46} {0} {5,5} {2,9} SI-02 : {0,4} {91} {0,5} {7} SI-03 : {34} {36} {18,1} {8} SI-04 : {42} {0} {1,5} {40} SI-05 : {63} {73,69} {2,66} {12}
baris 1 - baris 4 : rubah nilai antara tanda "{" dan "}", sedangkan pada baris 5 dan seterusnya adalah Nama Bahan serta isi kandungan ditandai dengan "{" dan "}"
script lengkapnya dapat didownload di sini
Tidak ada komentar:
Posting Komentar