标签:pac style pass c语言 ack code print 语言 name
#include <stdio.h> #include <conio.h> int main() { char *user; char *pass; char username[30]={0},pass_word[30]={0},password; int count = 0; //密码显示为 * while (password=getch()) { if(password == ‘\r‘) //Enter { pass_word[count]=‘\0‘; break; } else if((password==‘\b‘) && (count>0)) //Backspace { printf("\b \b"); count--; } else if((count==0) && (password==‘\b‘)) ; else { pass_word[count] = password; count++; printf("*"); } } pass=pass_word; printf("\n%s\n", pass); }
标签:pac style pass c语言 ack code print 语言 name
原文地址:https://www.cnblogs.com/candyYang/p/13157778.html