FLORIDA HIGH SCHOOLS COMPUTING COMPETITION '81
 
 
1.1  A coin is flipped repeatedly.  Input the number of heads and 
the number of tails that occur.  Compute the percent of the total 
flips that are heads and the percent that are tails. 
 
 
1.2  Find the measure of each angle of a regular polygon, given 
the number of sides.  Sum = 180(n-2) 
 
 
1.3  Read values for x, A, B, and C and print the value of: 
                            2 
                          Ax  + Bx + C. 
 
 
1.4  Often a "chain discount" is applied to an item.  First one 
and then another discount is applied.  Given the original price 
and the two discount rates, compute the final net price of the 
item. 
 
 
1.5  Accept a pair of coordinates and determine which Quadrant 
(I-IV) the point lies in, or if not, which axis.
 
 


2.1  Given fractions a/b and c/d (a,b,c, and d integers, b and d 
not zero), print their sum in lowest terms. 
 
 
2.2  Given the coordinates of four points in the xy-plane, 
determine whether the quadrilateral formed by joining the points 
in order is equilateral. 
 
 
2.3  Suppose that discounts for direct-dial long-distance calls 
are figured as follows (where the times are at the calling 
points). 
 
                    TIME               DAY    DISCOUNT 
         _____________________________________________
        |                         |           |       | 
        |  7:00 A.M. -  5:00 P.M. | Weekdays  |  None | 
        |  5:00 P.M. - 11:00 P.M. | Any day   |  20%  | 
        | 11:00 P.M. -  7:00 A.M. | Any day   |  40%  | 
        |  7:00 A.M. - 11:00 P.M. | Saturday  |  20%  | 
        |  7:00 A.M. -  5:00 P.M. | Sunday    |  40%  | 
        |_____________________________________________| 
 
For each call enter the day of the week (1=Sunday, 2=Monday, ... 
7=Saturday) and the time the call originated (in terms of a 
twenty-four hour clock; e.g., for 7:00 P.M. use 1900).  Print the 
discount rate for the call. 
 
 
2.4  Determine whether the graphs of the equations are parallel.  
Assume that a straight line may be parallel to itself. 
 
                      Ax + By = C 
                      Dx + Ey = F 
 
 
2.5  Find the LCM of three integers.
 



3.1  Given the base ten numeral for a whole number, convert it to 
a base-n numeral (n is whole number such that n is between 2 and 
10 inclusive). 
 
 
3.2  The MODE of a list of numbers is that value which occurs most 
often.  An array may have more than one mode.  Write a program to 
accept an array and print the mode(s) and the number of times each 
mode occurs. 
 
 
3.3  At Tiger Electric Company, the overtime rate for any hours 
over eight in a day is double the worker's regular rate.  Input 
into an array the worker's employee number and regular pay rate 
and then the number of hours worked during each of the five 
weekdays.  Compute the employee's gross weekly pay. 
 
 
3.4  Write a program in which the computer plays tic-tac-toe with 
a human opponent.  Use the following numbering system for the 
board. 
 
                          1 | 2 | 3  
                         ----------- 
                          8 | 9 | 4  
                         ----------- 
                          7 | 6 | 5  
 
Have the computer always move first to the center square.  This 
reduces the program strategy to offensive moves.  An algorithm can 
be developed in which the computer either wins or ties every game. 
 
 
3.5  At a certain company the mandatory retirement age is 70.  
Scan a file of employee's Social Security numbers, names, and 
birthdates.  Print a list of those employees who must retire 
within the next year, within two years, three, four, and five 
years.  Print the retirement lists in order of birthdays.