#include<stdio.h>
#include<conio.h>
main(){
char password[32];
printf("Masukan Password\t= ");
for (int i=0;i<32;i++){
password[i]=getch();
if (password[i]=='\r'){
password[i]=NULL;
break;
}
if (password[i]=='\b'){
if(i!=0)printf("\b \b");
password[i]=NULL;
password[i-1]=NULL;
i-=2;
if(i<-1)i=-1;
continue;
}
printf("*");
}
printf("\nPasswordnya adalah\t= %s",password);
printf("\n--ProgStur IT UMM--");
getch();
}
0 komentar:
Posting Komentar