Skip to content
Permalink
040c0c153e
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
21 lines (16 sloc) 364 Bytes
#include <stdio.h>
#include <string.h>
#define BUFFSIZE 30
#define PASSWORD "SwordF1sh!"
void main(void){
char buffer[BUFFSIZE];
printf("Enter Password> ");
fgets(buffer, BUFFSIZE, stdin);
//Remove the Newlines
buffer[strcspn(buffer, "\r\n")] = 0;
if (strcmp(buffer, PASSWORD) == 0){
printf("Win!!\n");
}
else
printf("Lose\n");
}