|
|
DataMuseum.dkPresents historical artifacts from the history of: MIKADOS |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about MIKADOS Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1097 (0x449)
Notes: Mikados TextFile, Mikados_K
Names: »ANDENGR1«
└─⟦bcf7b34c7⟧ Bits:30003895/4xCOMAL2.imd 4 * COMAL - SPC/1 - Disketter til bogen
└─⟦this⟧ »ANDENGR1«
0010 // -------------------------- andengr1 ---------------------- 0020 // Andengradsligningen med IF - THEN - ELSE - ENDIF 0030 CLEAR 0040 CURSOR 1,6 0050 PRINT " Andengradsligningen Ax2 + Bx + C = 0 " 0060 PRINT "--------------------------------------------" 0070 INPUT " Indtast A: ":A 0080 INPUT " Indtast B: ":B 0090 INPUT " Indtast C: ":C 0100 // ------------------------------------------------------------------ 0110 DISKRIMI:=B**2+(-4)*A*C 0120 // ------------------------------------------------------------------ 0130 IF DISKRIMI<0 THEN 0140 PRINT 0150 PRINT 0160 PRINT " ligningen har ingen reelle rødder." 0170 ELSE 0175 IF DISKRIMI=0 THEN 0180 X:=-B/2/A 0190 PRINT 0200 PRINT USING " Ligningen har dobbeltroden: +####.## ":X 0210 PRINT 0220 ELSE 0230 PRINT " Ligningen har to rødder: " 0240 PRINT 0250 X1:=(-B+SQR(DISKRIMI))/2/A 0260 PRINT USING "X1 = +####.## ":X1 0270 X2:=(-B-SQR(DISKRIMI))/2/A 0280 PRINT USING "X2 = +####.## ":X2 0290 ENDIF 0300 CURSOR 1,21