There are 500 sheets in a ream of copier paper. Write a program that prints a table giving the number of reams and the number of sheets.

Answer:

PRINT "Number of Reams", "Number of Sheets"

FOR REAM = 1 TO 10
    PRINT REAM, REAM * 500
NEXT REAM
'
END

Copy Cost Program

A copy shop wants a table that shows the price for the number of copies made. The table looks something like this:

Number of Copies       Price
    1                    0.15
    2                    0.30
    3                    0.45
           . . .
    50                   3.50

The cost per copy is as follows:

The charge per copy depends on how many copies you make. If you make 3 copies, the rate is 15 cents per copy and the total charge is 3 * 0.15 = $0.45. If you make 10 copies, then the rate is 7 cents per copy and the charge is 10 * 0.07 = $0.70. (Usually price schedules are more complicated than this.)

Here is an incomplete program that prints the table:

PRINT "Number of Copies", "Price"

FOR COPIES = 1 TO 50

  calculate price per copy
  calculate and print total price

NEXT COPIES
'
END

This will be more complicated than some of our recent programs.

QUESTION 11:

The price per copy calculation inside the loop has to choose between two prices. What sort of control structure do you suppose will be used?