#include "stdio.h "
#include "conio.h "
void passwordInput(char *password);
void main()
{
char password[30];
printf( "Please input the password: ");
passwordInput(password);
printf( "\nThe password you inputed is: %s ",password);
}
void passwordInput(char *password)
{
char character;
int i=0;
while(i <29 && (character=getch())!=0x0d)
{
*(password+i)=character;
printf( "* ");
i++;
}
*(password+i)= '\0 ';
}
#include "conio.h "
void passwordInput(char *password);
void main()
{
char password[30];
printf( "Please input the password: ");
passwordInput(password);
printf( "\nThe password you inputed is: %s ",password);
}
void passwordInput(char *password)
{
char character;
int i=0;
while(i <29 && (character=getch())!=0x0d)
{
*(password+i)=character;
printf( "* ");
i++;
}
*(password+i)= '\0 ';
}