// Directives:
#include <cstdlib>
#include <graphics.h>
using namespace std;


// Named constants and function prototypes:
const int S = 500; // Width and height of the graphics window.

// Function prototype: void draw_snowman(int x, int y, int radius)
// The draw_snowmen function draws a snowman cemtered at (x,y); 
// the radius of the body is given by the 3rd paramter. The head 
// is always right on top of the body with a radius that is half that of the body.
void draw_snowman(int x, int y, int radius);


//----------------------------------------------------------------------------------------
int main( )
{
    // 1. Initialize the graphics window:
    initwindow(S, S, "At the north pole!");
    
    // 2. Draw six snowmen:
    draw_snowman(S/5, S/3, S/17);
    draw_snowman(S/5, 2*S/3, S/50);
    draw_snowman(int(0.73*S), int(0.64*S), S/6);
    draw_snowman(int(0.5*S), int(0.43*S), S/10);
    draw_snowman(int(0.88*S), int(0.12*S), S/73);
    draw_snowman(int(0.66*S), int(0.1*S), S/39);

    // 3. Finish:
    delay(10000);
    return EXIT_SUCCESS;
}
// End: int main( )


//----------------------------------------------------------------------------------------
void draw_snowman(int x, int y, int radius)
{
    circle(x, y, radius); // the body
    circle(x, y-3*radius/2, radius/2); // the head
}
// End: draw_snowman(int x, int y, int radius)