做网站好还是阿里巴巴,google seo 营销网站,深圳专业网站排名公司,wordpress 主题 对比该楼层疑似违规已被系统折叠 隐藏此楼查看此楼/*--------实现密码的隐式输入-----------------*/inputpw(char *password,int len) /*len为密码长度*/{int i0; /*密码数组索引值,同时也表示记录已显示*的数目*/char ch;fflush(stdin); /*清洗流#xff0c;以防妨碍密码正确输入…该楼层疑似违规已被系统折叠 隐藏此楼查看此楼/*--------实现密码的隐式输入-----------------*/inputpw(char *password,int len) /*len为密码长度*/{int i0; /*密码数组索引值,同时也表示记录已显示*的数目*/char ch;fflush(stdin); /*清洗流以防妨碍密码正确输入*/for (ch getch();ch!13;ch getch() ) /*若输入回车则结束密码输入*/{if (ilen) continue; /*如果已到达len指定的长度*/if ( ch 8 ) /*若按了退格键*/{if ( i 0 ) /*如果已显示星数不为0*/{printf(\b);password[--i]\0; /*password[i-1]的值改为\0, 已显示星数减一,数组索引值减一*/}putchar(0); /*显示空字符*/printf(\b);continue ;}if( ch32 || ch127 ) continue; /*密码只能为ASCII码值为32-127的字符*/printf(*); /*上述情况都不是则显示一个星*/password[i]ch; /*将ch赋给password[i],已显示星数加一,数组索引值加一*/}password[i] \0; /*设置结尾的空字符*/}/*--------------管理员登录验证,返回登录状态------------------------*/int login(int x) /*x传入第几次登录*/{char pws[15],admin[]{dfghjfgfdg}; /*密码设定,未加密*/clrscr();if(x 2)printf(Input the password please:);elseprintf(The password you input is ERROR!please input again:);inputpw(pws,15);printf(\nSystem is checking your status,please wait...);sleep(2);if(strcmp(pws,admin)0){return TRUE;}elsereturn FALSE;}