Puzzle L30


Print a wavey line down the the page

[H-8]Write a main() program that prints a few cycles of a cosine wave down the page.

              *
             *
          *
         *
       *
       *
        *
          *
             *
              *
             *
          *
         *
       *
       *
         *
          *
             *

Hint: decide on how many cycles of the wave you want. Multiply that number by two*pi to find how many radians the wave goes through. Divide that by the number of rows to determine the number of radians for each row.



Previous Page        Answer         Next Page         Home