Change ColorNumber to a random integer 0 through 15.

Answer:

COLOR  INT( RND * 16 )

Since RND is at most slighly less than one, RND * 16 will be at most 15.99999. INT will change that to 15. So INT( RND * 16 ) is at most 15. (And is at minimum a zero.)

End of the Chapter

That is the end of this chapter. You may wish to review the following. Click on a subject that interests you to go to where it was discussed.

The next chapter starts a new topic: that of arrays. FOR loops will be very useful for programs that use arrays.

You have reached the end of the chapter.

go to previous page   go to home page