#include<stdio.h>
#include<conio.h>
void main()
{
int i=0;
char ch[20];
printf("Input you code\n");
while((ch[i]=getch())!='\r')
{
putchar('*');
i++;
}
ch[i]='\0'; //在字符串结尾加上\0你懂得
printf("\nYou code\n%s",ch);
getch();
}
#include<conio.h>
void main()
{
int i=0;
char ch[20];
printf("Input you code\n");
while((ch[i]=getch())!='\r')
{
putchar('*');
i++;
}
ch[i]='\0'; //在字符串结尾加上\0你懂得
printf("\nYou code\n%s",ch);
getch();
}