C语言密码问题
哪位高手发一段登录密码显示*的代码给我,谢谢!
程序代码:#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
int main()
{
int temp, i = 0;
char a[20] = {0};
while ((a[i] = getch()) != 13)
{
if (a[i] == 8)
{
temp = --i;system("cls");
while (temp--)putchar('*');
continue;
}
putchar('*');++i;
}
a[i] = '\0';putchar('\n');
puts(a);
return 0;
}









