|
!'シュヴァルツシルト半径
!'LET M=5.9723E+24 !'地球の重量(Kg)
!'LET M=1.9884E+30 !'太陽の重量(Kg)
INPUT PROMPT "重量(Kg)=":M
LET G=6.673848E-11 !'万有引力定数
LET C=299792458 !'光速度(m/s)
LET R=2*M*G/C/C
PRINT "ブラックホールの半径 ";R;"m"
END
-----------------------------------------------------------
!'プランク時間
LET C=299792458 !'光速度(m/s)
LET H=1.054571726E-34 !'ディラック定数
LET G=6.673848E-11 !'万有引力定数
PRINT SQR(H*G/C^5);"秒"
END
-----------------------------------------------------------
!'レムニスケート周率
LET S=1
FOR I=20000 TO 1 STEP -1
LET S=(2+(2*I)*(2*I+1)/S)
NEXT I
LET W=2*(1+1/S)
PRINT W
LET S=0
FOR R=0 TO 1-1/2^18 STEP 1/2^18
LET S=S+1/SQR(1-R^4)
NEXT R
PRINT 2*S/2^18
LET W=1
FOR N=10000 TO 1 STEP -1
LET W=1-W*(2*N-3)^2/(2*N)^2
NEXT N
LET W=W/2
PRINT 1/W
END
-----------------------------------------------------------
!'預金
INPUT PROMPT "預金 =": X
INPUT PROMPT "預け入れ年数=": N
INPUT PROMPT "利率 =": R
PRINT "単利法 "; INT(X * (1 + N * R / 100))
PRINT "年複利法 "; INT(X * (1 + R / 100)^N)
PRINT "半年複利法 "; INT(X * (1 + R / 200)^(2 * N))
PRINT "複利法 "; INT(X * EXP(N * R / 100))
END
-----------------------------------------------------------
!'ローン返済
INPUT PROMPT "借入金 =": A
INPUT PROMPT "年利 (%)=": R
INPUT PROMPT "返還年数=": N
LET R = R / 100
LET X1 = A * R * (1 + R)^ N / ((1 + R)^N - 1)
PRINT "元利均等返済方式 "; INT(X1);"円"
PRINT "元金均等返済方式"
FOR I = 1 TO N
LET X2=A/N*(1+(N-I+1)*R)
PRINT "No.";I; INT(X2);"円"
NEXT I
END
-----------------------------------------------------------
!'遠心力
!'F=質量*速度^2/半径
!'F=質量*半径*角速度^2
!'LET M=5.9723E+24 !'地球の重量(Kg)
!'LET G=6.673848E-11 !'万有引力定数
!'LET R=6.378E+6 !' 地球の半径(m)
!'PRINT G*M/R^2;"N"
INPUT PROMPT "半径(m)=":R
INPUT PROMPT "回転数(秒)=":L
!'INPUT PROMPT "回転速度(m/s)=":LL
!'LET L=LL/(2*PI*R)
INPUT PROMPT "重量(Kg)=":M
!'LET V=2*PI*L*R !'角速度
LET W=2*PI*L
LET V=W*R !'速度
!'LET F=M*V^2/R
LET F=M*R*W^2
PRINT F;"N" !'!遠心力
PRINT V^2/R/9.80665;"G" !'G=V^2(m/s)/R(m)/g(9.80665)
PRINT F/M/9.80665;"G"
LET RPM=L*60 !'毎分回転
LET RCF= 11.1824395816324*(RPM/1000)^2*R*100 !'R(cm) RPM(回転/分)
PRINT RCF;"G"
PRINT 299.041677197263*SQR(RCF/R/100)/60;"回転/秒"
PRINT L;"回転/秒"
END
-----------------------------------------------------------
!'長生き
INPUT PROMPT "移動速度(Km/h)=":V
INPUT PROMPT "移動し続けた時間(秒)=":S
LET V=V/3.6
LET C=299792458 !'光速度(m/s)
IF V>=C THEN
PRINT"光速を超えています"
STOP
END IF
LET A=S*SQR(1-V*V/C/C)
PRINT"時間 ";A;"秒"
PRINT"遅れた時間 ";S-A;"秒"
END
-----------------------------------------------------------
!'長生き
INPUT PROMPT "高さ(m)=":H
INPUT PROMPT "時間(秒)=":S
LET C=299792458 !'光速度(m/s)
LET G=9.80665 !' 重力加速度
LET A=G*H/C/C
PRINT"地上より";S*A;"秒 時間が進む"
END
-----------------------------------------------------------
!'質量増加
INPUT PROMPT "質量 Kg=":G
INPUT PROMPT "移動速度(Km/h)=":V
LET V=V/3.6
LET C=299792458 !'光速度(m/s)
IF V>=C THEN
PRINT"光速を超えています"
STOP
END IF
LET A=G/SQR(1-V*V/C/C)
PRINT"質量 ";A;"Kg"
PRINT"増えた質量 ";A-G;"Kg"
END
-----------------------------------------------------------
!'水平投射
SET BITMAP SIZE 600,300
SET WINDOW 0 , 299 ,20,-279
DRAW AXES(20,20)
INPUT PROMPT "初速度(m/s)=":V0
INPUT PROMPT "高さ=":H
LET G=9.80665 !'重力加速度
PLOT LINES: 0,-H;
DO
LET T=T+1/128
LET X=V0*T
LET Y=-H+G*T^2/2
PLOT LINES: X,Y;
LOOP UNTIL Y>=0
PRINT"水平到達距離(m)";X;V0*SQR(2*H/G)
PRINT "到達時間(秒)";SQR(2*H/G)
END
-----------------------------------------------------------
!'斜方投射
LET XSIZE=800
LET YSIZE=600
LET RATE=5
SET BITMAP SIZE XSIZE,YSIZE
SET WINDOW 0 , (XSIZE-1)/RATE , -20/RATE,(YSIZE-21)/RATE
DRAW AXES(10,20)
INPUT PROMPT "初速度(m/s)=":V0
LET G=9.80665
INPUT PROMPT "角度=":TT
LET TH=TT*PI/180
PLOT LINES: 0,0;
LET YY=0
LET T=0
DO
LET T=T+1/128
LET X=V0*COS(TH)*T
LET Y=V0*SIN(TH)*T-G*T^2/2
PLOT LINES: X,Y;
LET YY=MAX(YY,Y)
LOOP UNTIL Y=<0
PRINT "距離(m)";X;"到達高度(m)";YY;"到達時間(秒)";T;V0*SIN(TH)*2/G
PRINT "距離(m)";V0^2/G*SIN(2*TH);"到達高度(m)";(V0*SIN(TH))^2/2/G;"最高点到達時間(秒)";V0*SIN(TH)/G
END
-----------------------------------------------------------
!'十二支
OPTION BASE 0
DIM A$(11)
FOR I=0 TO 11
READ A$(I)
NEXT I
DATA "申(さる)","酉(とり)","戌(いぬ)","亥(い)","子(ね)","丑(うし)"
DATA "寅(とら)","卯(う)","辰(たつ)","巳(み)","午(うま)","未(ひつじ)"
INPUT PROMPT "西暦=":Y
PRINT "十二支=";A$(MOD(Y,12))
END
-----------------------------------------------------------
!'重力加速度
LET R=6378137 !' 地球の半径(m)
LET G0=9.80665 !'高度0での重力加速度
INPUT PROMPT "高さ(m) H=":H
LET G=G0*(R/(R+H))^2
PRINT "高度Hでの重力加速度";G;"m/s^2"
LET M=5.9723E+24 !'地球の重量(Kg)
LET G=6.673848E-11 !'万有引力定数
LET GG=G*M/(R+h)^2
PRINT "高度Hでの重力加速度";GG;"m/s^2"
END
-----------------------------------------------------------
!'星座
DIM NISU(12), D$(13), N1(13), N2(13)
DO
INPUT PROMPT "月,日 =": M, D
LOOP WHILE M < 1 OR M > 12 OR D < 1 OR D > 31
FOR I = 1 TO 12
READ NISU(I)
NEXT I
FOR I = 1 TO 13
READ M1, D1, M2, D2, D$(I)
LET N1(I) = NISU(M1) + D1
LET N2(I) = NISU(M2) + D2
NEXT I
LET N = NISU(M) + D
LET I = 0
DO
LET I = I + 1
LOOP UNTIL N1(I) <= N AND N2(I) >= N
PRINT M; "月"; D; "日は"; D$(I); "です"
DATA 0,31,59,90,120,151,181,212,242,273,304,334
DATA 1,1,1,19,山羊座
DATA 1,20,2,18,水瓶座
DATA 2,19,3,20,魚座
DATA 3,21,4,19,牡羊座
DATA 4,20,5,20,牡牛座
DATA 5,21,6,21,双子座
DATA 6,22,7,22,蟹座
DATA 7,23,8,22,獅子座
DATA 8,23,9,22,乙女座
DATA 9,23,10,23,天秤座
DATA 10,24,11,22,さそり座
DATA 11,23,12,21,射手座
DATA 12,22,12,31,山羊座
END
-----------------------------------------------------------
!'太陽質量
LET R=1.4959E+11 !'地球との平均距離
LET G=6.673848E-11 !'万有引力定数
LET T=365.24*24*60*60 !'秒
PRINT 4*PI^2*R^3/(G*T^2);"Kg"
LET K=3E-19 !'s2/m^3
PRINT 4*PI^2/(G*K);"Kg"
END
-----------------------------------------------------------
!'地球質量
LET G0=9.80665 !'重力加速度
LET R=6378137 !'地球の半径(m)
LET G=6.673848E-11 !'万有引力定数
PRINT G0*R^2/G;"Kg"
END
|
|