#include <stdio.h>
#include <math.h>
#include "checkit.h"

/* A type for directions on a compass */
typedef enum
{
    north,
    east,
    south,
    west
}
compass_direction;

/* Convert degrees to a compass direction */
compass_direction getHeading(int degrees)
{
    if (degrees > 270 || degrees < 90)
    {  
        return north;
    }
    else
    {
        return south;
    }
}

int main(void)
{
    /* Test Cases */
    checkit_enum(getHeading(271), north);
    checkit_enum(getHeading(20), north);
    checkit_enum(getHeading(269), south);
    checkit_enum(getHeading(91), south);
    return 0;
}