Last active
August 29, 2015 13:56
-
-
Save oliverbooth/8868685 to your computer and use it in GitHub Desktop.
Happy Birthday!
This file contains hidden or 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> | |
| int main(int argc, char *argv[]) { | |
| if(argc == 1) | |
| printf("Whose birthday is it?\n"); | |
| else if (argc == 2) | |
| for(int i = 1; i <= 4; i++) | |
| printf("Happy birthday %s %s\n", i % 3 == 0 ? "dear" : "to", i % 3 == 0 ? argv[1] : "you"); | |
| else | |
| printf("Too many.\n"); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment