START
and 14 for FINISH
what will the program print?
START
and 3 for FINISH
what will the program print?
Say that you want a program to write out the squares of numbers from zero to 25. Remember that the square of a number is the number times itself. You want the output to look something like this:
Number Square 0 0 1 1 2 4 3 9 . . . 25 625
The program needs to do two things: (i) count from zero to 25, and,
(ii) calculate the square of each number.
This sounds like a good place for a FOR
loop.
Here is a start on the program:
' Make a table of squares from 0 to 25 ' PRINT "Number", "Square" ' LET START = ____________ ' LET FINISH = ____________ ' FOR NUM = START TO FINISH PRINT ______________, _______________ NEXT NUM ' END
Fill in the blanks so that the program works.