英文:
I want to check whether the user has entered something
问题
a] 如何检查用户是否已经在 scanf 语句中输入了内容。
b] 如何重复运行代码的一部分,而不使用 goto 函数,或者有没有替代 goto 的方法。
英文:
I am facing a problem that is is follows:
a] How to check whether the user has entered something against the scanf statement.
b] How to run a part of code repeatedly without goto function or what is the replacement for goto.
答案1
得分: 1
a] scanf()返回成功扫描和分配的输入数量。
b] 如何重复运行一部分代码,而不使用goto函数或替代goto。
循环。
英文:
> a] How to check whether the user has entered something against the scanf statement.
scanf() returns the number of successful inputs scanned and assigned.
> b] How to run a part of code repeatedly without goto function or what is the replacement for goto.
Loops.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论