Per a calculadores TI-92
RACIONAM.9XP
RACIONAM.9XP
()
Prgm
Lbl in
Dialog
Text ""
Dropdown "Sistema",{"INRA (Francès),NRC (Americà)"},wa
Text ""
Text ""
Dropdown "",{"CONTINUAR","SORTIR"},qa
EndDlog
If qa=2
Goto in
Lbl inra
Dialog
Request "N° d´aliments ",n
Request "Pes viu ",p
Request "P. llet (Kg/dia)",l
Request "% Matèria grassa",m
DropDown "Evolució del pes...",{"?????","increment","decrement"},v
DropDown "Estabulació........",{"?????","lliure","pastura"},e
DropDown "Gestació...........",{"no","7è mes","8è mes","9è mes"},g
DropDown "",{"CONTINUAR","SORTIR"},qa
EndDlog
If qa=2
Goto in
expr(p)→p
expr(n)→n
expr(l)→l
expr(m)→m
If e=1 Then
1→q
ElseIf e=2 Then
1.1→q
Else
1.2→q
EndIf
"%MS"→s2
"UFL"→s3
"PDIN"→s4
"PDIE"→s5
"ULL"→s6
For i,1,n
ClrIO
InputStr "Aliment "&string(i)&"?",o
"a"&exact(string(i))→a
o→#a
"b"&exact(string(i))&"1"→b
Dialog
Text #a
Text ""
Dropdown "Kg. de menjar",{"en M.F.","en M.S."},pa
Request "",w
Text ""
EndDlog
expr(w)→w
w→#b
ClrIO
For r,2,6
"b"&exact(string(i))&exact(string(r))→b
"s"&exact(string(r))→s
Input #s&" ?",w
w→#b
EndFor
EndFor
ClrIO
0→z
For r,1,6
"s"&exact(string(r))→s
Output 5,(r-1)*34+35,#s
EndFor
For i,1,n
"a"&exact(string(i))→a
Disp #a
Lbl for
For r,1,6
If z=0 Then
"b"&exact(string(i))&exact(string(r))→b
Else
"b"&k[i]&exact(string(r))→b
EndIf
"s"&exact(string(r))→s
If mod(i,2)=0 Then
Output 65,(r-1)*40,#s
Output 75,(r-1)*40,#b
Else
Output 15,(r-1)*40,#s
Output 25,(r-1)*40,#b
EndIf
EndFor
If mod(i,2)=0 Then
Pause
ClrIO
EndIf
Disp ""
If z=1 Then
Goto for1
EndIf
EndFor
For o,1,6
"c"&string(n+1)&exact(string(o))→c
0→#c
EndFor
Disp "N? d´aliments utilitzats en la ració"
input t
For i,1,t
InputStr "Nom de l´aliment",h
For j,1,n
"a"&exact(string(j))→t
If when(#t =h,true) Then
"b"&exact(string(j))&"1"→a
"b"&exact(string(j))&"2"→b
"c"&string(n+1)&"1"→c
#c+#a→ #c
#a*#b%→#b
"c"&string(n+1)&"2"→c
#c+#b→ #c
#b→a
For o,3,6
"c"&string(n+1)&exact(string(o))→c
"b"&exact(string(j))&exact(string(o))→b
#b*a→#b
#c+#b→#c
EndFor
j→k[j]
EndIf
EndFor
ClrIO
EndFor
"MS"→s2
For i,1,t
"a"&K[i]→a
disp #a
1→z
goto for
lbl for1
EndFor
Disp "Suma total"
For r,1,6
"c"&string(n+1)&exact(string(r))→c
"s"&exact(string(r))s
Output 15,(r-1)*40,#s
Output 25,(r-1)*40,#b
EndFor
ClrIO
l*(0.4+0.15*m)→l
e*(1.4+0.006*p)→aa
95+0.5*p→ba
0.44*l→ca
48*l→da
22-8.25*e^(-0.002*l)+(p-600)*0.01→ea
Goto in
Lbl nrc
Dialog
Request "N? aliments totals",n
Request "Pes viu de l´animal",p
Request "Kg llet / dia",l
Request "%Mat. grassa llet",m
DropDown "L´animal",{"manté el pes","incrementa el pes","decrementa el pes"},v
DropDown "Animal en gestació",{"no","7è mes","8è mes","9è mes"},g
DropDown "Menu",{"Coninue","Quit"},qa
EndDlog
expr(p)→p
expr(n)→n
expr(l)→l
expr(m)→m
Goto in
EndPrgm
EndPrgm
Cap comentari:
Publica un comentari a l'entrada