您要的是这个吗?#include "stdio.h"#include "conio.h"
main(){ char str[20]={'\0'}; int i=0; char ch; ch=getch(); while(ch!='\r') { str[i++]=ch; putchar('*'); ch=getch(); } getch();}
谢谢!!