0 Members and 1 Guest are viewing this topic.
Define LibPub gaslaws()=Prgm:Local equ:Text "Choose Equation-(1) Boyle's Law(2) Charles' Law(3) Gay-Lussac's Law(4) Avogadro's Law(5) Ideal Gas Law(6) Combined Gas Law(7) Van der Waals' Equation(8) Graham's Law":Request "Choose Equation:",equ:If equ=1 Then:Goto a:ElseIf equ=2 Then:Goto b:ElseIf equ=3 Then:Goto c:ElseIf equ=4 Then:Goto d:ElseIf equ=5 Then:Goto e:ElseIf equ=6 Then:Goto f:ElseIf equ=7 Then:Goto g:ElseIf equ=8 Then:Goto h:EndIf:Lbl a:©Boyle's Law:RequestStr "V1",v1:RequestStr "V2",v2:RequestStr "P1",p1:RequestStr "P2",p2:Disp "Answer: "&nSolve(expr(v1)*expr(p1)=expr(v2)*expr(p2),x):Lbl b:©Charles' Law:RequestStr "V1",v1:RequestStr "V2",v2:RequestStr "T1",t1:RequestStr "T2",t2:Disp "Answer: "&nSolve(((expr(v1))/(expr(t1)))=((expr(v2))/(expr(t2))),x):Lbl c:©Gay-Lussac's Law:Lbl d:©Avogarro's Law:RequestStr "V1",v1:RequestStr "V2",v2:RequestStr "n1",n1:RequestStr "n2",n2:Disp "Answer: "&nSolve(((expr(v1))/(expr(n1)))=((expr(v2))/(expr(n2))),x):Lbl e:©Ideal Gas Law:RequestStr "V1",v1:RequestStr "V2",v2:RequestStr "P1",p1:RequestStr "P2",p2:RequestStr "T1",t1:RequestStr "T2",t2:Disp "Answer: "&nSolve(((expr(v1)*expr(p1))/(expr(t1)))=((expr(v2)*expr(p2))/(expr(t2))),x):Lbl f:©Combined Gas Law:RequestStr "V1",v1:RequestStr "V2",v2:RequestStr "P1",p1:RequestStr "P2",p2:RequestStr "T1",t1:RequestStr "T2",t2:RequestStr "n1",n1:RequestStr "n2",n2:Disp "Answer: "&nSolve(((expr(v1)*expr(p1))/(expr(t1)*expr(n1)))=((expr(v2)*expr(p2))/(expr(t2)*expr(n2))),x):Lbl g:©Van der Waals Equation:Lbl h:EndPrgm
That should make the program better. Thanks for your help! I have to finish this program fast before my Chemistry final. I still have a long list of programs to go.