REM Jennifer Sun

REM Freehold High School

REM School Code: 9001

REM Intermediate Division

REM Contest I

REM QBASIC

REM Advisor: J. Gill

 

CLS

FOR inputting = 1 TO 5

 

INPUT "input: ", bidamt, trickswon, suit$, status$

PRINT "output: ";

 

IF suit$ = "S" THEN suit$ = "H"

IF suit$ = "D" THEN suit$ = "C"

undertheline = 0

overtheline = 0

pointsbelow = 0

bid = bidamt + 6

IF trickswon > bid THEN overtheline = trickswon - bid

IF trickswon < bid THEN undertheline = bid - trickswon

 

IF undertheline <> 0 THEN

                pointsbelow = 0

        IF status$ = "V" THEN

                pointsabove = 100 * undertheline

        END IF

        IF status$ = "N" THEN

                pointsabove = 50 * undertheline

        END IF

        GOTO 100

END IF

 

IF suit$ = "T" THEN

                bidamt = bidamt - 1

                pointsbelow = 40

                pts = 30

        ELSEIF suit$ = "H" THEN

                pts = 30

        ELSEIF suit$ = "C" THEN

                pts = 20

END IF

 

IF undertheline = 0 THEN

                pointsbelow = pointsbelow + bidamt * pts

        IF overtheline <> 0 THEN

                pointsabove = overtheline * pts

        ELSE pointsabove = 0

        END IF

END IF

 

100 PRINT pointsbelow; ","; pointsabove

PRINT

 

NEXT inputting

 

END