Leap years occur every four years. Write a program that prints out the leap years from 1964 to 2000.
FOR YEAR = 1964 TO 2000 STEP 4 PRINT YEAR; NEXT ODD ' END
This is not a very practical program.
A better program would check if a YEAR
is
a century year divisible by 400 before printing it,
and would allow the user to input beginning and ending years.
But let's skip that detail and move on to another simple program.
A gross of some item means twelve dozen items, or 144 items. Let's design a program that writes a table like the following:
Number of Gross Number of Items 1 144 2 288 3 432 . . . 10 1440
What sort of loop will be useful for this program?