Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF (EN)

33 270 PLOT 85,X+100,0 280 GCOL,0 290 MOVEX,H 300 DRAW X+100,H 310 DRAW X+170,H+50 320 MOVE X+100,H 330 DRAW X+100,0 340 MOVE X+10,50 350 PRINT MID$(M$,C,1) 360 NEXT 370 380 GCOL 4,1 390 MOVE 0,450:PRINT "----------------" 400 VDU4 410 PRINTTAB(3,0)"critical level" The height of each bar is set randomly by the variable H. If you want to put in your own values (data), then type the following extra lines. Line 170 must also be deleted by typing 170 followed by RETURN .

50 DIM data(12) 82 FOR J=1 TO 12 84 PRINT "Input data for month "MID$(M$,J,1); 86 INPUT data(J) 88 NEXT J 89 INPUT "CRITICAL LEVEL", level 155 H=data(C+1) 390 MOVE 0,level:PRINT"---------------" QUADRAT This program can be used to solve equations of the form Y=Ax 2 + Bx + C The ‘roots of the equation’ are printed to two decimal places. The number of decimal places is set by line 90. The main program between lines 110 and 170 uses three procedures – one for each of the three types of result. The main program is surrounded by REPEAT ..... ..... ..... UNTIL FALSE which keeps the program going for ever – or until the ESCAPE key is pressed.