Function Exercise#1

  1. First copy the program DrawCirc.C from my public directory.
  2. Make a function called draw_circle() so that main looks like so:
        int main()
        {
          draw_circle();
          draw_circle();
          draw_circle();
          return 0;
        }
    
  3. Now change your main() so that it prompts the user once to allow them to enter their own character for the circles. NO global variables!

Function Exercise#2

  1. Copy circle.C out of my public directory
  2. Your mission, since I'm forcing you to accept it, is to integrate the circle.C program with the square function that we just went over.
  3. In the circle.C program we find the area by using pi * radius * radius.
    Replace radius * radius with the square function.
  4. Something you must decide : which version of square are you going to use? The one from square1.C, square2.C, or square3.C? Is there only one that will work? Will all of them work?
    NO globals!

Switch/Function Exercise#3