#include <stdio.h>

enum ANGLETAG {DEGREE, RADIAN};

typedef struct {
    enum ANGLETAG tag;
    union {
        struct { int deg, mnt; } degree;
        double radian;
    } data;        
} ANGLE;

void prtdegree(FILE* fp, ANGLE a) {
    switch (a.tag) {
    case DEGREE:
        fprintf(fp, "%d degrees %d minutes", 
                a.data.degree.deg, a.data.degree.mnt);
        break;
    case RADIAN:
        fprintf(fp, "%f radian", a.data.radian);
        break;
    }
}


