c++中如何实现回车符的输入,并输出他的ASCII码 ?

2025-05-16 02:42:59
推荐回答(1个)
回答(1):

#include
#include
int main()
{
char s;
s = getche();//实时回显,可以接受回车
printf("%d\n",(int)s);
return 0;
}