How to enter a variable in an INPUT ?
|
12-06-2019, 09:31 PM
(This post was last modified: 12-07-2019 07:19 PM by What_Else.)
Post: #1
|
|||
|
|||
How to enter a variable in an INPUT ?
Hello, I bought an HP Prime there is very little time!
I wanted to test the HP Prime Basic language by doing a vector product calculation program. The problem is that I can not at all include variables in INPUT (I wish I could enter 4x for example instead of 4) Code: EXPORT Produit_Vectoriel() BEGIN LOCAL A,B,C,D,E,F; LOCAL X,Y,Z,N; INPUT({A,B,C},"Vecteur 1",{"X = ","Y = ","Z = "}); INPUT({D,E,F},"Vecteur 2",{"X' = ","Y' = ","Z' = "}); CAS("B*F*-C*E▶X"); C*D-A*F▶Y; A*E-B*D▶Z; CAS("sqrt(X^2+Y^2+Z^2)▶N"); PRINT(); PRINT(" "); PRINT(" Résultat :"); PRINT(" |"+X); PRINT(" |"+Y); PRINT(" |"+Z); PRINT(" "); PRINT(" Norme : "+N); END; Thank you |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
How to enter a variable in an INPUT ? - What_Else - 12-06-2019 09:31 PM
RE: How to enter a variable in an INPUT ? - Dougggg - 12-07-2019, 10:14 PM
RE: How to enter a variable in an INPUT ? - What_Else - 12-07-2019, 10:48 PM
RE: How to enter a variable in an INPUT ? - Dougggg - 12-09-2019, 03:11 AM
RE: How to enter a variable in an INPUT ? - What_Else - 12-09-2019, 06:29 PM
RE: How to enter a variable in an INPUT ? - CyberAngel - 12-10-2019, 06:15 PM
RE: How to enter a variable in an INPUT ? - What_Else - 12-10-2019, 06:40 PM
RE: How to enter a variable in an INPUT ? - Dougggg - 12-10-2019, 04:06 AM
|
User(s) browsing this thread: 2 Guest(s)