10 CLS 11 REM " This program allows the user to input subject results for 3 classes" 12 REM " Aurthor = David Lee" 13 REM " Date = 25/7/01" 14 DIM c1 AS STRING 15 DIM c2 AS STRING 16 DIM c3 AS STRING 17 DIM correct AS STRING 18 DIM make AS INTEGER 19 DIM z AS INTEGER 20 DIM make2 AS STRING 21 COLOR 9 22 LOCATE 1, 27 23 PRINT "Teachers Database" 24 LOCATE 3, 1 25 PRINT "Enter the 3 classes you teach" 26 LOCATE 5, 1 27 PRINT "Class 1" 28 INPUT c1$ 29 PRINT "Class 2" 30 INPUT c2$ 31 PRINT "Class 3" 32 INPUT c3$ 33 LOCATE 12, 1 34 PRINT "The classes you have entered into the database are:" 35 COLOR 10 36 LOCATE 14, 1 37 PRINT "1."; c1 38 PRINT "2."; c2 39 PRINT "3."; c3 40 LOCATE 18, 1 41 COLOR 9 42 INPUT "Is this correct? if so press y"; correct 43 IF correct$ = "y" THEN GOTO 44 ELSE GOTO 10 44 SLEEP 1 100 CLS 101 COLOR 9 102 PRINT "-----------------------------Choose a class--------------------------------" 103 COLOR 10 104 LOCATE 4, 1 105 PRINT "1."; c1 106 PRINT "2."; c2 107 PRINT "3."; c3 108 PRINT "4.Reset the database" 109 PRINT "5.End selection" 110 COLOR 9 111 LOCATE 10, 1 112 INPUT "Make your selection"; make 113 IF make = 1 THEN GOTO 200 114 IF make = 2 THEN GOTO 300 115 IF make = 3 THEN GOTO 400 116 IF make = 4 THEN GOTO 10 117 IF make = 5 THEN END 200 CLS 201 LOCATE 1, 30 202 PRINT c1$ 203 LOCATE 3, 1 204 PRINT "How many students do you wish to enter into the database" 205 INPUT z 206 FOR x = 1 TO z 207 PRINT "Enter the name of the student" 208 INPUT name1$(x) 209 PRINT "Enter the mark for "; name1$(x) 210 INPUT mark1(x) 211 NEXT x 212 COLOR 4 213 PRINT "This information has now been stored to the database and can be " 214 PRINT "viewed by selecting view mark sheet" 215 SLEEP 5 216 GOTO 500 300 CLS 301 LOCATE 1, 30 302 PRINT c2$ 303 PRINT "How many students do you wish to enter into the database" 304 INPUT z 305 PRINT "Enter The Names Of The Students" 306 FOR x = 1 TO z 307 PRINT "Enter The Names Of The Students" 308 INPUT name2$(x) 309 PRINT "Enter the mark for "; name2$(x) 310 INPUT mark2(x) 311 NEXT x 312 COLOR 4 313 PRINT "This information has now been stored to the database and can be " 314 PRINT "viewed by selecting view mark sheet" 315 SLEEP 5 316 GOTO 500 400 CLS 401 LOCATE 1, 30 402 PRINT c3$ 403 PRINT "How many students do you wish to enter into the database" 404 INPUT z 405 PRINT "Enter The Names Of The Students" 406 FOR x = 1 TO z 407 PRINT "Enter The Names Of The Students" 408 INPUT name3$(x) 409 PRINT "Enter the mark for "; name3$(x) 410 INPUT mark3(x) 411 NEXT x 412 COLOR 4 413 PRINT "This information has now been stored to the database and can be " 414 PRINT "viewed by selecting view mark sheet" 415 SLEEP 5 416 GOTO 500 500 CLS 501 COLOR 10 502 LOCATE 1, 27 503 PRINT "Make your selection" 504 COLOR 9 505 LOCATE 3, 1 506 PRINT "1.Enter another subjects marks" 507 PRINT "2.view mark sheet" 508 PRINT "3.End program" 509 INPUT make2 510 IF make2 = "1" THEN GOTO 100 511 IF make2 = "2" THEN GOTO 600 512 IF make2 = "3" THEN END 600 CLS 601 LOCATE 1, 21 602 PRINT "The class marks are as follows" 603 COLOR 10 604 LOCATE 3, 1 605 PRINT " "; c1$; " "; c2$; " "; c3$ 606 COLOR 9 607 FOR x = 1 TO z 608 PRINT name1$(x); " "; mark1(x); " "; mark2(x); " "; mark3(x) 609 NEXT x 610 FOR x = 1 TO z 611 sum = sum + mark1(x) 612 NEXT x 613 average = sum / z 614 FOR x = 1 TO z 615 sum1 = sum1 + mark2(x) 616 NEXT x 617 average1 = sum1 / z 618 FOR x = 1 TO z 619 sum2 = sum2 + mark3(x) 620 NEXT x 621 average2 = sum2 / z 622 COLOR 4 623 PRINT "Class average"; average; " "; average1; " "; average2 624 REM LPRINT "Class averages"; c1$; average; " "; c2$; average1; " "; c3$; average2; 625 END