[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Grade Conversions
How does one make this into an application for use in win98? (or 95, or
3.1?)
David Johnson <trainman@ozemail.com.au> wrote in message
3809F19B.E80230C9@ozemail.com.au">news:3809F19B.E80230C9@ozemail.com.au...
> Graham Fry wrote:
> I also went to the trouble of creating a BASIC program to do the
conversions by
> computer. It is listed below:
>
> 1 REM Copyright David Johnson
> 5 RAD = 3.141592654# / 180
> 10 CLS
> 20 PRINT "Gradient Conversion Program"
> 30 PRINT "Enter Number of known data"
> 40 PRINT "1 = Rise : Distance (1 in x)"
> 50 PRINT "2 = Angle (Degrees)"
> 60 PRINT "3 = Percentage"
> 70 INPUT G
> 80 CLS
> 90 IF G = 1 THEN 200
> 100 IF G = 2 THEN 300
> 110 IF G = 3 THEN 400
> 120 GOTO 10
> 200 INPUT "Enter Horizontal Distance - 1 in "; GH
> 210 GP = (1 / GH) * 100
> 220 GD = ATN(1 / GH) / RAD
> 230 GOTO 500
> 300 INPUT "Enter Angle in degrees "; GD
> 310 GP = (TAN(GD * RAD)) * 100
> 320 GH = 1 / (TAN(GD * RAD))
> 330 GOTO 500
> 400 INPUT "Enter Gradient Percentage "; GP
> 410 GD = ATN(GP / 100) / RAD
> 420 GH = 1 / (GP / 100)
> 430 GOTO 500
> 500 CLS
> 510 PRINT "Gradient is:"
> 520 PRINT "1 in"; GH
> 530 PRINT GD; " degrees"
> 540 PRINT GP; "%"
> 550 END
>
> I hope this is of some help to you. For further discussion on the
subject, do a
> search at http://www.deja.com for "Katoomba Scenic Railway not steepest?"
>
>
> --
> David Johnson
> trainman@ozemail.com.au
> http://www.ozemail.com.au/~trainman/
>
>