1 网上查到的信息,enter键可以有对应\n\r、\r\n、\r、\n) ,首先确认在C语言中getchar()获取的是什么字符(’\n‘)
2 使用代码实现,通过enter结束循环
posted on 2023-02-05 23:45 笛若心生 阅读(1058) 评论(0) 收藏 举报