#include <stdio.h>
#include <conio.h>
int main(void)
{
int ch;
while('/r' != (ch=getch()))
putch('*');
return 0;
}
该程序使用C语言实现了一个简单的字符输入监听功能。通过getch()函数读取键盘输入,并使用putch('*')输出星号作为反馈,直到用户按下回车键结束程序运行。此示例有助于理解基本的输入输出操作。
#include <stdio.h>
#include <conio.h>
int main(void)
{
int ch;
while('/r' != (ch=getch()))
putch('*');
return 0;
}

被折叠的 条评论
为什么被折叠?