옵션 |
|
#include<stdio.h>
void login()
{
char password[10]="pass";
char ch,pass[10];
int i=0;
printf("Enter the access password:");
do{
ch=getch();
if(ch!=13 && ch!=8){
putch('*');
pass[i]=ch;
i++;
}
}while(ch!=13);
if( strcmp(pass,password)==0 ) // compare with password
printf("\nPASS");
else
printf("\nFAIL");
}
int main(void){
login();
return 0;
}