爪哇。 “输入”作为新行,不提交
如何
1 2
4 5 4 2 3
1 2 1 1 1
在cmd中输入? 我不希望在按“Enter”时读取“1 2”,而是转到下一行并写入“4 5 4 2 3”
how to input
1 2
4 5 4 2 3
1 2 1 1 1
to cmd?
I don't want "1 2" to be read when I press "Enter" but to go to next line and write "4 5 4 2 3"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我只是在这里做猜测,因为你确实没有给我太多的帮助,但是你是否考虑过使用转义字符 () 来转义换行符?
或者,只需创建一个循环,继续读取,直到输入空行:
I'm just doing guesses here, since you really didn't give me much to work with, but did you consider using the escape character () to escape newlines?
Alternatively, just create a loop that keeps reading until you enter an empty line: