Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define MAX_GET 5
- int charLower(int c) {
- if (c >= 65 && c <= 90) {
- return c+32;
- }
- return c;
- }
- int main() {
- int correct;
- char gotca[MAX_GET];
- char answer[] = "noob";
- printf("happy birthday john\ncongratulations for living this long!\n");
- printf("\nwhat is the best word to describe john? (clue: 4 letter word)\n");
- do {
- printf("answer: ");
- fgets(gotca, MAX_GET + 1, stdin);
- gotca[strcspn(gotca, "\n")] = 0;
- correct = strcmp(gotca, answer);
- if (correct != 0) {
- puts("incorrect..");
- }
- } while (correct != 0);
- puts("\n\
- ) ( ) (\n\
- (^)(^)(^)(^)\n\
- _i__i__i__i_\n\
- (____________)\n\
- |####|>o<|###| \n\
- (____________)\n");
- printf(":)");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement