home *** CD-ROM | disk | FTP | other *** search
- 1 PRINT "From the April 1985 SKY & TELESCOPE, p. 359."
- 2 PRINT
- 3 PRINT "This program calculates the combined magnitude of two stars whose"
- 4 PRINT "magnitudes are individually known and includes a loop so that"
- 5 PRINT "additional stars may be combined."
- 6 PRINT
- 7 PRINT "INPUT: First and second star magnitudes."
- 8 PRINT
- 9 PRINT "OUTPUT: Total magnitude, count of stars combined." : PRINT
- 10 REM ADDING MAGNITUDES
- 15 REM
- 20 B=100^.2 : N=2 : C=LOG(10)
- 25 INPUT "1ST STAR MAG";M1
- 30 INPUT "2ND STAR MAG";M2
- 35 M=B^-M1+B^-M2
- 40 M=-2.5*LOG(M)/C
- 45 PRINT "TOTAL MAG: ";M
- 50 M1=M : N=N+1 : PRINT
- 55 INPUT "ANOTHER STAR (ENTER X TO END): ",M$
- 60 IF M$="X" THEN 75
- 65 IF M$>"9" THEN 55
- 70 M2=VAL(M$) : GOTO 35
- 75 PRINT "STAR COUNT: ";N-1
- 80 RUN "ASTRMENU.BAS"
- ,M$
- 60 IF M$="X" THEN 75
- 65 IF M$>"9" THEN 55
- 70 M2=VAL(M$) : GOTO 35
- 75 PRINT "STAR COUNT: ";N-1
- 80 RUN "A