Last active
March 13, 2016 20:36
-
-
Save RyanBreaker/501129e88fe368db2536 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> | |
void PrintShampooInstructions(int numCycles) { | |
if (numCycles < 1) { | |
printf("Too few.\n"); | |
return; | |
} | |
if (numCycles > 4) { | |
printf("Too many.\n"); | |
return; | |
} | |
for(int i = 1; i <= numCycles; i++) { | |
printf("%d: Lather and rinse.\n", i); | |
} | |
printf("Done.\n"); | |
} | |
int main(void) { | |
PrintShampooInstructions(2); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment