|
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: 3008 (0xbc0) Notes: Mikados TextFile, Mikados_K Names: »ANDENGR3«
└─⟦92e6f589c⟧ Bits:30003895/4xCOMAL3b.imd 4 * COMAL - SPC/1 - Disketter til bogen └─⟦this⟧ »ANDENGR3« └─⟦faca42ef2⟧ Bits:30003895/4xCOMAL1.imd 4 * COMAL - SPC/1 - Disketter til bogen └─⟦this⟧ »ANDENGR3«
0010 // -------------------------- andengr3 ---------------------- 0020 // Andengradsligningen med CASE - ENDCASE samt PROCEDURER 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 EXEC INGEN 0160 WHEN DISKRIMI=0 0170 EXEC EN_ROD 0180 WHEN DISKRIMI>0 0190 EXEC TO_RØDDER 0200 ENDCASE 0210 // ----------------------------------------------------------------- 0220 PROC INGEN 0230 PRINT 0240 PRINT " Ligningen har ingen reelle rødder." 0250 ENDPROC INGEN 0260 // ----------------------------------------------------------------- 0270 PROC EN_ROD 0280 X:=-B/2/A 0290 PRINT 0300 PRINT USING " Ligningen har dobbeltroden: ####.## ":X 0310 ENDPROC EN_ROD 0320 // ---------------------------------------------------------------- 0330 PROC TO_RØDDER 0340 PRINT 0350 PRINT " Ligningen har to rødder:" 0360 X1:=(-B+SQR(DISKRIMI))/2/A 0370 X2:=(-B-SQR(DISKRIMI))/2/A 0380 PRINT USING " x1 = ####.## ":X1 0390 PRINT USING " x2 = ####.## ":X2 0400 ENDPROC TO_RØDDER