|
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: 1504 (0x5e0) Notes: Mikados TextFile, Mikados_K Names: »ANDENGR2«
└─⟦4cd80c18f⟧ Bits:30003895/4xCOMAL3a.imd 4 * COMAL - SPC/1 - Disketter til bogen └─⟦this⟧ »ANDENGR2« └─⟦bcf7b34c7⟧ Bits:30003895/4xCOMAL2.imd 4 * COMAL - SPC/1 - Disketter til bogen └─⟦this⟧ »ANDENGR2«
0010 // -------------------------- andengr2 ---------------------- 0020 // Andengradsligningen med CASE - ENDCASE 0025 INTEGER TRUE,FALSE 0026 TRUE:=1;FALSE:=0 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 CASE TRUE OF 0140 WHEN DISKRIMI<0 0150 PRINT 0160 PRINT " Ligningen har ingen reelle rødder." 0170 WHEN DISKRIMI=0 0180 X:=-B/2/A 0190 PRINT 0200 PRINT USING " Ligningen har dobbeltroden: ###.## ":X 0210 PRINT 0220 WHEN DISKRIMI>0 0230 PRINT " Ligningen har to rødder: " 0240 PRINT 0250 X1:=(-B+SQR(DISKRIMI))/2/A 0260 PRINT USING " xl = ###.## ":X1 0270 X2:=(-B-SQR(DISKRIMI))/2/A 0280 PRINT USING " x2 = ###.## ":X2 0290 ENDCASE 0300 CURSOR 1,21