SHARE
TWEET

Untitled

a guest May 4th, 2012 10 Never
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     char password[10];
  6.     puts("Enter password: ");
  7.     scanf("%s", password, 1);
  8.    
  9.     if(!strcmp(password, "password"))
  10.     {
  11.         printf("Thanks for logging in...");
  12.         getch();
  13.     }
  14.    
  15.     else
  16.     {
  17.         printf("Login failed!");
  18.         getch();
  19.     }
  20. }
RAW Paste Data
Top