
| Turbo C - Password Checker |
|
#include<stdio.h> #include<string.h> /* Programmed by Harvey Losin */ /* http://www.bikoy.com/harvey */ /* webmaster@bikoy.com */ main() { char pass[20]; clrscr(); printf("n Enter Password: "); gets(pass); /* input password */ if(!strcmp(pass,"secret")) /* checks if password is same as 'secret' */ { printf("n YOU HAVE FINALLY ENTERED!"); } else { printf("n Access Denied! Goodbye!"); } getch(); }
|