/* Program: Heartbeats Programmer : Jason Gradziel */ #include #include void setup(void); void process(void); void wrapup(void); int years, months; unsigned long beats; void main(void) { setup(); process(); wrapup(); } void setup(void) { clrscr(); printf("\n\t\tHow old are you ?: "); scanf("%d",&years); printf("\n\t\tHow many months has it been"); printf("\n\t\tsince your last birthday? : "); scanf("%d", &months); } void process(void) { beats = ((years * 525600) + (months * 43200)) * 80; } void wrapup(void) { printf("\n\n\tYour heart has more than %lu times so far!",beats); if (years > 40) printf("\n\n\t\tSure hope you're HEARTSMART!!"); else printf("\n\n\t\tLots more beats in this ticker!!"); getche(); }