#include 'stdio.h'
#include 'string.h'
#include 'stdlib.h'
void password(char *pass)
{ char password[20],inletter=NULL;
int i=0;
clrscr();
gotoxy(17,6);
printf('\n\t\tInput your password:');
while((i<20)&&(inletter!='\r'))
{ inletter=getch(); /*无回显输入*/
if(inletter==8)
{ if(i>0)
{password[--i]=NULL;
putchar(8); /*退格键*/
putchar(' '); /*以空格代替*/
putchar(8);
}
else putchar(7); /*没有任何字符的退格,响铃警告*/
}
else if(inletter!='\r')
{ password[i++]=inletter;