Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
Idk why there's an error, i am making a PV=nRT calculator. Please help. I'm new to ti-basic, i usually program in c#.

Code:

ClrHome
Input "What to solve for?", q
If q="p"
Then
Input "Please enter v", b
Prompt n,t
((n*8.314*t)/b)->p
Disp p
End
If q="v"
Then
Prompt p,n,t
((n*8.314*t)/p)->b
Disp b
End
If q="n"
Then
Input "Please enter v", b
Prompt p,t
((p*b)/(8.314*t))->n
Disp n
End
If q="t"
Then
Input "Please enter v", b
Prompt p,n
((p*b)/(n*8.314))->t
Disp t
End
If q="r"
Then
Disp "8.314"
End
Thanks, i didn't know that variables had to be uppercase.
Please refrain from double posting when less than a day has passed. You can edit your posts with the edit button if necessary.

What error are you getting? If you press Goto in the error, what line does it take you to?

Also, you cannot store strings into letter variables. This can be fixed by replacing Q with Str1.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement