mdgaziur001

Never Gonna make you cry

Nov 26th, 2021 (edited)
548
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main() {
  5.     char input[13];
  6.     char password[13] = "somepassword";
  7.    
  8.     printf("Enter password: ");
  9.     scanf("%s", input);
  10.  
  11.     printf("authenticating... ");
  12.  
  13.     if (strcmp(input, password) == 0) {
  14.         printf("[ok]");
  15.     }
  16.     else {
  17.         printf("[fail]");
  18.     }
  19.  
  20.     printf("\n");
  21. }
Add Comment
Please, Sign In to add comment