- #1
Clutch Cargo
- 18
- 0
After looking for programs for advanced physics with no luck I decided to write my own.
What I have so far is a simple program to calculate relitavistic velocity:
(v1,v2)
Prgm:Local
Input "Enter velocity 1" .v1
Input "Enter velocity 2" .v2
If v1<0 Then
(v1+v2)/(1+(v1*v2))»vr
EndIf
If V1>.9999 Then
(v1+v2)/(1+(v1*v2)/_c^2)»vr
EndIf
Disp "Relativistic Velocity",vr
Pause
DelVar vr
EndPrgm
The problem I have is that no matter what I do I get errors.
First it doesn't like my Input functions, if I take those out it doesn't like my If statements, if I take those out as well it doesn't even like the math statements. Can anyone tell me what I'm doing wrong? P.S. the math functions nested in the If statements are indented but this BB doesn't show that.
What I have so far is a simple program to calculate relitavistic velocity:
(v1,v2)
Prgm:Local
Input "Enter velocity 1" .v1
Input "Enter velocity 2" .v2
If v1<0 Then
(v1+v2)/(1+(v1*v2))»vr
EndIf
If V1>.9999 Then
(v1+v2)/(1+(v1*v2)/_c^2)»vr
EndIf
Disp "Relativistic Velocity",vr
Pause
DelVar vr
EndPrgm
The problem I have is that no matter what I do I get errors.
First it doesn't like my Input functions, if I take those out it doesn't like my If statements, if I take those out as well it doesn't even like the math statements. Can anyone tell me what I'm doing wrong? P.S. the math functions nested in the If statements are indented but this BB doesn't show that.