If you have time.....why/where is the infinite loop???
Thanks for looking!
Cheers,
Williwaw
Code:
//Sets the window size
0->Xmin
10->Xmax
0->Xscl
0->Ymin
25->Ymax
0->Yscl
//Formats window
RectGC
CoordOff
GridOff
AxesOff
LabelOff
//Turns on function
Func
FnOn
//Draws background
Line(0,0,0,.5)
Line(0,.5,.5,.5)
Line(.25,.5,.25,.9)
Line(.5,.5,.5,0)
Line(.5,0,1,0)
Line(1,0,1,0)
Line(1,0,2,2)
Line(2,2,2.5,1.5)
Line(2.5,1.5,4,5)
Line(4,5,5,2.5)
Line(5,2.5,5.5,3)
Line(5.5,3,6.5,0)
Line(6.5,0,10,0)
//Draws target and places
//target randomly in window
Lbl A
0->B
randInt(7,9)->C
Line(C,.2,C+.6,.2)
Line(C,.4,C+.4,.4)
Line(C,.5,C+.3,.5)
For(A,1,500)
End
//Parabolic function
//of the missle
Lbl B
B+1->B
Input "R= ",R
(-X^2+RX)->Y
DispGraph
Pause
For(T,0,10,.25)
Y-Z
Pt-On(X,Y)
If Z<0 or Z=0
End
//Clears input
//and stops program
ClrHome
ClrDraw
Stop
Thanks for looking!
Cheers,
Williwaw