10   REM  File:QUAD2.bas
20   REM  Course: IB Computer Science
30   REM  Student:
40   REM  Purpose: Convert the QUAD1.bas program using GWBASIC
41   REM           into a program to calculate the roots of a quadratic
41   REM           equation and make sure that A is not zero and
42   REM           that D is not negative. 
50   REM  Note: All statements in basic beginning with "REM" are remarks
52   REM        Use REMark statements to comment program code
100  PRINT "Begin program QUAD1.bas"
110  INPUT "Enter values for a, b, c (separate using commas): ",A, B, C
120  PRINT "You entered: ", A, B, C
200  REM Caclulate D
210  D = B^2 - (4 * A * C)
300  REM Caclulate E
310  E = (-B + SQR(D)) / (2 * A) 
400  REM Calculate F
410  F = (-B - SQR(D)) / (2 * A)
500  REM Send output to the users
510  PRINT "The roots are : ", E, F
9000 REM You may want to REM out the System call if you are
9010 REM working interactively with GWBASIC. 
9999 SYSTEM
