Skip to content

Instantly share code, notes, and snippets.

@kylefeng
Created October 20, 2013 07:49
Show Gist options
  • Save kylefeng/7066172 to your computer and use it in GitHub Desktop.
Save kylefeng/7066172 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
int main(void) {
char pw[8] = "pass";
char in[8];
while (1) {
scanf("%s", in);
if (strcmp(in, pw) == 0) {
printf("yes\n");
break;
} else {
printf("no\n");
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment