#include<stdio.h>
#include<conio.h>
#define MAX 500
int main(){
char password[MAX];
char p;
int i=0;
printf("Enter the password:");
while((p=getch())!= 13){
password[i++] = p;
printf("*");
}
password[i] = '\0';
if(i<6)
printf("\nWeak password");
printf("\nYou have entered: %s",password);
return 0;
}
OUTPUT
Enter the password: *******
You have entered: acb65k$
#include<conio.h>
#define MAX 500
int main(){
char password[MAX];
char p;
int i=0;
printf("Enter the password:");
while((p=getch())!= 13){
password[i++] = p;
printf("*");
}
password[i] = '\0';
if(i<6)
printf("\nWeak password");
printf("\nYou have entered: %s",password);
return 0;
}
OUTPUT
Enter the password: *******
You have entered: acb65k$
No comments:
Post a Comment