Created
September 21, 2011 16:30
-
-
Save b-adams/1232555 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
const int EGGS_IN_CARTON = 12; | |
const int HUNGRY_PEOPLE = 3; | |
const int DAYS_OF_X = 12; | |
const int SINGERS = 3; | |
void reportOnEggs(); | |
void reportOnPackets(); | |
int main(void) | |
{ | |
reportOnEggs(); | |
reportOnPackets(); | |
reportOnEggs(); | |
} | |
void reportOnEggs() | |
{ | |
printf("There are %d eggs per person\n", EGGS_IN_CARTON/HUNGRY_PEOPLE); | |
printf("There are %d eggs per day\n", EGGS_IN_CARTON/DAYS_OF_X); | |
} | |
void reportOnPackets() | |
{ | |
printf("We need %d song packets\n", DAYS_OF_X/SINGERS); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment