mdgaziur001

Never Gonna make you cry

Nov 26th, 2021 (edited)
280
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data Copied