#include <stdio.h> typedef enum {FALSE, TRUE} Boolean; Boolean isEven(int i) { if ( i % 2 == 0 ) return TRUE; else return FALSE; } int main() { int i = 10; printf("%d ", isEven(i)); return 0; }
#include <stdio.h> typedef enum {MON=1, TUE, WED, THU, FRI, SAT, SUN} days_of_week; int main() { days_of_week d = SUN; switch (d) { case SUN: case SAT: printf("%s ", "weekend"); break; default: printf("weekdays "); } return 0; }