FLORIDA HIGH SCHOOLS COMPUTING COMPETITION '85
JUDGING CRITERIA
1.1 INPUT: Enter command: ADD
INPUT: Enter number: 18
INPUT: Enter command: TAKE
OUTPUT: 18
INPUT: Enter command: ADD
INPUT: Enter number: 5
INPUT: Enter command: ADD
INPUT: Enter number: 99
INPUT: Enter command: TAKE
OUTPUT: 99
INPUT: Enter command: ADD
INPUT: Enter number: 34
INPUT: Enter command: TAKE
OUTPUT: 34
INPUT: Enter command: TAKE
OUTPUT: 5
INPUT: Enter command: QUIT
OUTPUT: (program ends)
1.2 INPUT: Enter N, AV: 28, 15
OUTPUT: NUMBER ERASED WAS 1
INPUT: Enter N, AV: 31, 16.2
OUTPUT: NUMBER ERASED WAS 10
INPUT: Enter N, AV: 101, 50.68
OUTPUT: NUMBER ERASED WAS 83
1.3 INPUT: Enter N, D: 18, -4
OUTPUT: S= 4.2426
SUM=18
INPUT: Enter N, D: 1562500, 2
OUTPUT: S=1300.000
SUM= 4
INPUT: Enter N, D: 1194, -1
OUTPUT: S= 34.6000
SUM=13
1.4 RUN PROGRAM:
OUTPUT: A time dial simulation will be displayed in the
center of the screen. The count starts with 1985, and then
steadily increases the years by 1 until the year 2345 is reached:
The time interval between each new year will decrease as the
numbers increase, starting with one new year every second, to
steadily and rapidly counting faster than the eye can comprehend,
ending with the year 2345, which remains on the screen. The
displays should not flicker. The program should take less than 60
seconds to run.
1.5 INPUT: Enter N: 18
OUTPUT: ROUND 1 9 GAMES
ROUND 2 4 GAMES 1 BYE
ROUND 3 2 GAMES 1 BYE
ROUND 4 1 GAMES 1 BYE
ROUND 5 1 GAMES
TOTAL 17 GAMES 3 BYES
INPUT: Enter N: 67
OUTPUT: ROUND 1 33 GAMES 1 BYE
ROUND 2 17 GAMES
ROUND 3 8 GAMES 1 BYE
ROUND 4 4 GAMES 1 BYE
ROUND 5 2 GAMES 1 BYE
ROUND 6 1 GAMES 1 BYE
ROUND 7 1 GAMES
TOTAL 66 GAMES 5 BYES
1.6 INPUT: Enter N, M: 900, 1300
OUTPUT: SMALLEST = 912
LARGEST = 987
SUM = 53172
INPUT: Enter N, M: 33, 333
OUTPUT: SMALLEST = 123
LARGEST = 329
SUM = 27990
1.7 INPUT: Enter name: DOUG
Enter part#: T100
Enter time: 3
OUTPUT: CUSTOMER NAME: DOUG
PART #: T100
DESCRIPTION: 27X1 INCH TIRE TUBE
PART COST: 12.50
LABOR COST: 30.00
5% TAX: 0.63
TOTAL: 43.13
INPUT: Enter name: BRAD
Enter part#: S445
Enter time: 2.5
OUTPUT: CUSTOMER NAME: BRAD
PART #: S445
DESCRIPTION: COMPUCYCLE COMPUTER
PART COST: 33.95
LABOR COST: 25.00
5% TAX: 1.70
TOTAL: 60.65
1.8 INPUT: Enter # of lines on label: 4
OUTPUT:
PARKER, HARRY
222-3333
SIMON, BILL
123-4567
SIMON, BOB
123-4455
SPINXS, LISA
987-6543
TROUTMAN, HARRY
876-2174
1.9 RUN PROGRAM: A 5x5 matrix of 25 letters, A through Y, is
randomly generated and centered on the top part of the screen,
with every adjacent letter on a row separated by a space.
SECRETLY CHOOSE THE LETTER 'Y' AND NOTE ITS POSITION IN THE ARRAY.
The computer must ask the user yes(Y)-or-no(N) questions to
logically determine the secret letter (using similar questions as
shown in the example). The computer will start with a score of 11
points and will deduct 1 point for each question that is asked and
answered. The score is displayed in the upper right corner after
each question is asked. If the program does not determine the
letter before the computer score reaches 0, then no credit is
awarded at this time. If the letter Y is guessed and the score is
greater than 0, then run this program one more time and ensure
that the new matrix is different from the previous matrix:
SECRETLY CHOOSE THE LETTER 'P' AND NOTE ITS POSITION IN THE ARRAY.
OUTPUT: Q W E R T SCORE=11
Y U I O P
A S D F G
H J K L M
X C V B N
OUTPUT/INPUT: IS THE LETTER IN ROW 1? N
OUTPUT: (The score decreases to 10 at the top right)
OUTPUT/INPUT: IS THE LETTER IN ROW 2? Y
OUTPUT: (The score decreases to 9)
OUTPUT/INPUT: IS THE LETTER IN COL 1? Y
OUTPUT: (The score decreases to 8)
YOUR LETTER IS Y
1.10 RUN PROGRAM: Press the appropriate keys I,J,K,M to place
the cursor in the center of the screen.
INPUT: 1
OUTPUT: The box below with respect to the cursor (#):
#
*********
* *
* 1 *
* *
*********
RUN PROGRAM: Place the cursor in the center of the screen.
INPUT: 2
OUTPUT: #
*********
* *
* 2 *
* *
*********
RUN PROGRAM: Place the cursor in the center of the screen.
INPUT: 3
OUTPUT: *********
* *
* 3 *
* *
*********
#
RUN PROGRAM: Place the cursor in the center of the screen.
INPUT: 4
OUTPUT: *********
* *
* 4 *
* *
*********
#
RUN PROGRAM: Place the cursor at the absolute left side of the
screen
INPUT: 2
OUTPUT: OFF THE SCREEN
RUN PROGRAM: Place the cursor at the top of the screen.
INPUT: 3
OUTPUT: OFF THE SCREEN
2.1 RUN PROGRAM:
OUTPUT: A random letter outlines the border of the screen,
then upon pressing the space bar, the inside border of the new
screen will be outlined by a random letter; afterwards, when the
space bar is pressed, the inside border of the new screen will be
outlined by a random letter, and so on. These rectangles are
drawn until the whole screen is filled, then press the space bar
once again and the screen will clear and start over with a new
outer border. A miniature sample run would look like this:
RRRRRRRRRRR RRRRRRRRRRR RRRRRRRRRRR
R R RQQQQQQQQQR RQQQQQQQQQR
R R RQ QR RQYYYYYYYQR
R R RQ QR RQYYYYYYYQR
R R RQQQQQQQQQR RQQQQQQQQQR
RRRRRRRRRRR RRRRRRRRRRR RRRRRRRRRRR
2.2 INPUT: Enter N: 10
Enter letter: G
Enter letter: H
Enter letter: L
Enter letter: L
Enter letter: R
Enter letter: S
Enter letter: S
Enter letter: Q
Enter letter: B
Enter letter: A
OUTPUT: G H L
L R S
INPUT: Enter N: 15
Enter letter: Z
Enter letter: Z
Enter letter: A
Enter letter: C
Enter letter: B
Enter letter: G
Enter letter: P
Enter letter: Q
Enter letter: Y
Enter letter: T
Enter letter: W
Enter letter: E
Enter letter: F
Enter letter: M
Enter letter: X
OUTPUT: B G P Q Y
2.3 INPUT: Enter text: PROVIDE A 5 CHARACTER LEFT MARGIN. DO
NOT PUT MORE THAN 30 CHARACTERS ON A
LINE. THE LAST WORD IS FOLLOWED BY A
PERIOD.
OUTPUT: PROVIDE A 5 CHARACTER
LEFT MARGIN. DO NOT PUT MORE
THAN 30 CHARACTERS ON A LINE.
THE LAST WORD IS FOLLOWED BY A
PERIOD.
INPUT: Enter text: A WORD IS DEFINED AS A SET OF CHARACTERS
IN BETWEEN TWO SPACES (EXCEPT FOR THE
FIRST AND LAST WORDS OF THE STRING).
OUTPUT: A WORD IS DEFINED AS A
SET OF CHARACTERS IN BETWEEN
TWO SPACES (EXCEPT FOR THE
FIRST AND LAST WORDS OF THE
STRING).
2.4 INPUT: Enter word: INTERNATIONAL
OUTPUT: ALNANNERIITOT
INPUT: Enter word: CLASS
OUTPUT: CLASS
INPUT: Enter word: UNIVERSITY
OUTPUT: ENIRISTUVY
2.5 INPUT: Enter number of words: 5
Enter word: COMPUTER
Enter word: APPLE
Enter word: PERSONAL
Enter word: CREATIVE
Enter word: POPULAR
OUTPUT: NO COMMON LETTERS
INPUT: Enter N: 6
Enter word: CREATIVE
Enter word: ELECTRONIC
Enter word: PROCESS
Enter word: PEACH
Enter word: EDUCATION
Enter word: COMPLEX
OUTPUT: C E
INPUT: Choose letter: E
OUTPUT: CREATIVE
ELECTRONIC
PROCESS
PEACH
EDUCATION
COMPLEX
2.6 INPUT: Place 1: T INPUT: Place 1: A
Place 2: D Place 2: B
Place 3: C Place 3: A
Place 4: T Place 4: C
Place 5: D Place 5: C
Place 6: C Place 6: B
Place 7: T Place 7: A
Place 8: D Place 8: A
Place 9: C Place 9: B
Place 10: C Place 10: C
Place 11: D Place 11: C
Place 12: T Place 12: A
Place 13: C Place 13: C
Place 14: D Place 14: B
Place 15: C Place 15: A
Place 16: D Place 16: A
Place 17: T Place 17: B
Place 18: T Place 18: B
Place 19: C Place 19: B
Place 20: D Place 20: C
Place 21: T Place 21: C
OUTPUT: (in any order) OUTPUT: (in any order)
TEAM T: 28 POINTS TEAM A: 23 POINTS
TEAM D: 28 POINTS TEAM B: 34 POINTS
TEAM D WINS! TEAM A WINS!
TEAM T: 28 POINTS TEAM A: 23 POINTS
TEAM C: 28 POINTS TEAM C: 32 POINTS
TEAM C WINS! TEAM A WINS!
TEAM D: 27 POINTS TEAM B: 29 POINTS
TEAM C: 28 POINTS TEAM C: 26 POINTS
TEAM D WINS! TEAM C WINS!
2.7 RUN PROGRAM:
OUTPUT: A. EDIT OR CHANGE A VALUE
B. DISPLAY THE RESULTS
C. QUIT
INPUT: Enter option: B
OUTPUT: 10.11 20.22 30.33 60.66
11.10 22.20 33.30 66.60
10.00 20.00 30.00 60.00
31.21 62.42 93.63 187.26
INPUT: (press any key)
OUTPUT: A. EDIT OR CHANGE A VALUE
B. DISPLAY THE RESULTS
C. QUIT
INPUT: Enter option: A
Enter row, col: 2, 1
Enter number: 5.5
INPUT: (press any key)
OUTPUT: A. EDIT OR CHANGE A VALUE
B. DISPLAY THE RESULTS
C. QUIT
INPUT: Enter option: B
OUTPUT: 10.11 20.22 30.33 60.66
5.50 22.20 33.30 61.00
10.00 20.00 30.00 60.00
25.61 62.42 93.63 181.66
INPUT: (press any key)
OUTPUT: A. EDIT OR CHANGE A VALUE
B. DISPLAY THE RESULTS
C. QUIT
INPUT: Enter option: A
Enter row, col: 1, 3
Enter number: 29.67
INPUT: (press any key)
OUTPUT: A. EDIT OR CHANGE A VALUE
B. DISPLAY THE RESULTS
C. QUIT
INPUT: Enter option: A
Enter row, col: 3, 2
Enter number: 39
INPUT: (press any key)
OUTPUT: A. EDIT OR CHANGE A VALUE
B. DISPLAY THE RESULTS
C. QUIT
INPUT: Enter option: B
OUTPUT: 10.11 20.22 29.67 60.00
5.50 22.20 33.30 61.00
10.00 39.00 30.00 79.00
25.61 81.42 92.97 200.00
INPUT: (press any key)
OUTPUT: A. EDIT OR CHANGE A VALUE
B. DISPLAY THE RESULTS
C. QUIT
INPUT: Enter option: C
OUTPUT: (program terminates)
2.8 RUN PROGRAM:
OUTPUT: 2 5 1 0 2 X 5 = 10
2 7 1 4 2 X 7 = 14
2 8 1 6 2 X 8 = 16
2 9 1 8 2 X 9 = 18
3 4 1 2 3 X 4 = 12
3 6 1 8 3 X 6 = 18
3 7 2 1 3 X 7 = 21
3 8 2 4 3 X 8 = 24
3 9 2 7 3 X 9 = 27
4 5 2 0 4 X 5 = 20
4 7 2 8 4 X 7 = 28
4 8 3 2 4 X 8 = 32
4 9 3 6 4 X 9 = 36
5 6 3 0 5 X 6 = 30
5 8 4 0 5 X 8 = 40
6 7 4 2 6 X 7 = 42
6 9 5 4 6 X 9 = 54
7 8 5 6 7 X 8 = 56
7 9 6 3 7 X 9 = 63
8 9 7 2 8 X 9 = 72
TOTAL = 20
2.9 INPUT: Enter N: 11
Enter word: CREATE
Enter word: CREATION
Enter word: CREATIVE
Enter word: CREATURE
Enter word: EVERYBODY
Enter word: EVERYONE
Enter word: ELECTION
Enter word: CREDIT
Enter word: COMPUTER
Enter word: PRINTER
Enter word: EMPTY
INPUT: Enter string: CREAT*
OUTPUT: CREATE
CREATION
CREATIVE
CREATURE
INPUT: Enter string: *TION
OUTPUT: CREATION
ELECTION
INPUT: Enter string: E*Y
OUTPUT: EVERYBODY
EMPTY
INPUT: Enter string: *ATER
OUTPUT: NO WORDS FOUND
INPUT: Enter string: *PRINTER
OUTPUT: PRINTER
INPUT: Enter string: END
OUTPUT: (program terminates)
2.10 INPUT: Enter last 5-minutes: 90
OUTPUT: (Briefly scan only the messages from 40 MIN to 90 MIN)
OF CO DS OFFICE COMP. DRY. MIN:SE
: : : : : : :
: : : : : : :
1 0 0 72.5 68.0 83.0 40:00
0 0 0 71.7 68.4 83.1 40:30
0 1 0 72.6 70.2 83.3 42:45
0 1 0 73.5 67.5 83.5 45:00
0 0 0 74.4 64.8 83.7 47:15
0 0 0 75.5 67.0 84.0 50:00
0 1 0 77.1 70.2 84.4 54:00
0 1 0 77.5 69.0 84.5 55:00
1 1 0 78.1 67.2 84.7 56:30
1 1 1 76.0 66.5 85.0 60:00
1 1 1 74.7 67.2 82.2 65:00
1 1 1 73.3 67.8 79.3 70:00
0 1 1 72.0 68.5 76.5 75:00
0 1 0 72.7 68.1 74.9 76:45
0 0 0 73.8 64.8 75.2 79:30
0 0 0 74.0 65.2 75.3 80:00
0 0 0 76.0 69.2 75.8 85:00
0 1 0 76.4 70.0 75.9 86:00
0 1 0 78.0 65.2 76.3 90:00
3.1 INPUT: Enter top, front: 1, 3
OUTPUT: TOP=1 FRONT=3 RIGHT=5
BACK=4 LEFT=2 BOTTOM=6
INPUT: Enter top, front: 2, 3
OUTPUT: TOP=2 FRONT=3 RIGHT=1
BACK=4 LEFT=6 BOTTOM=5
INPUT: Enter top, front: 4, 6
OUTPUT: TOP=4 FRONT=6 RIGHT=2
BACK=1 LEFT=5 BOTTOM=3
INPUT: Enter top, front: 6, 2
OUTPUT: TOP=6 FRONT=2 RIGHT=4
BACK=5 LEFT=3 BOTTOM=1
3.2 INPUT: Enter A, B, C: 1, 0, -1
OUTPUT: (X-1)(X+1) or (X+1)(X-1)
INPUT: Enter A, B, C: -6, 7, -2
OUTPUT: (3X-2)(2X-1) or (2X-1)(3X-2)
INPUT: Enter A, B, C: 18, 12, 2
OUTPUT: 2(3X+1)(3X+1)
INPUT: Enter A, B, C: 1, 2, 3
OUTPUT: CANNOT BE FACTORED
3.3 INPUT: Enter expression: 5/8/100*100 OUTPUT: 0.625
INPUT: Enter expression: 6-4+5/4*10 OUTPUT: 14.500
INPUT: Enter expression: 4*1*0/6 OUTPUT: 0.000
INPUT: Enter expression: 12/3+5-3*6*2+7 OUTPUT: -20.000
3.4 INPUT: Enter N: 12
OUTPUT: 479001600
INPUT: Enter N: 40
OUTPUT: 815915283247897734345611269596115894272000000000
3.5 INPUT: Enter #1: 5678901234.5
Enter #2: 45.610987
OUTPUT: SUM = 5678901280.110987
DIFFERENCE = 5678901188.889013
INPUT: Enter #1: 8765432109.8765432109
Enter #2: 2109.87654321
OUTPUT: SUM = 8765434219.7530864209
DIFFERENCE = 8765430000.0000000009
INPUT: Enter #1: 69.1
Enter #2: 2.3456
OUTPUT: SUM = 71.4456
DIFFERENCE = 66.7544
3.6 RUN PROGRAM: A snake (a trail of 30 asterisks '*') is
centered on the screen. Upon hitting appropriate keys, designated
by students, the snake's head moves in the appropriate direction
while the rest of the snake slithers along the same right angle
paths. The snake must move CONTINUOUSLY in the designated
direction UNTIL a new directional key is hit. The snake must be
30 asterisks long throughout the entire run; It must not leave a
sketched path. The snake continues moving until it runs into
itself or it runs off the screen or a non-directional key is
pressed.
Run the program and have the snake move in all directions. Have
the snake run into itself to check that the program will STOP.
For the next execution, have the snake attempt to leave the
screen, which should cause the program to STOP.
3.7 INPUT: Enter word: LIFE
Enter K: 5
OUTPUT: ELFI FILE IFEL
INPUT: Enter word: COMPUTE
Enter K: 721
OUTPUT: ECMOPTU MCEOPUT OCEMTPU
3.8 Check to see that no two pennies (asterisks) are in the same
column, row, or main diagonal: Check that the Row equals the
Column at most once; Check that the sum of the coordinates equals
N+1 at most once.
NOTE: PLACEMENT OF THE ASTERISKS WILL VARY ALONG WITH THE SUMS.
INPUT: Enter N: 6
OUTPUT: TOTAL = 6
1 2 3 4 5 6
1 * (1,2) SUM = 3
2 * (2,4) SUM = 6
3 * (3,6) SUM = 9
4 * (4,1) SUM = 5
5 * (5,3) SUM = 8
6 * (6,5) SUM = 11
INPUT: Enter N: 7
OUTPUT: TOTAL = 7
1 2 3 4 5 6 7
1 * (1,1) SUM = 2
2 * (2,3) SUM = 5
3 * (3,5) SUM = 8
4 * (4,7) SUM = 11
5 * (5,2) SUM = 7
6 * (6,4) SUM = 10
7 * (7,6) SUM = 13
INPUT: Enter N: 8
OUTPUT: (similar format as first two runs)
TOTAL = 8
1 2 3 4 5 6 7 8
:
INPUT: Enter N: 14
OUTPUT: (similar format as first two runs)
TOTAL = 14
1 2 3 4 5 6 7 8 9 0 1 2 3 4
:
3.9 INPUT: Enter N: 5
OUTPUT: 31
INPUT: Enter N: 10
OUTPUT: 1023
INPUT: Enter N: 12
OUTPUT: 4095
3.10 INPUT: Enter S: 36
OUTPUT: P = 15678 Q = 39 R = 402
INPUT: Enter S: 62
OUPTUT: P = 58401 Q = 63 R = 927