使用scanf进行切换和组合,如何避免多次输入
作者:Player1 ready 提问时间:4/6/2023
在这个组合中,当我按“a”或“b”时,这很好,但我不希望程序打印并且当用户输入“ab”时。switchwhile12 当用户输入包含多个字符的输入时,如何打印错误消息? #include <std...
while-loop switch-statement 问答列表
作者:Player1 ready 提问时间:4/6/2023
在这个组合中,当我按“a”或“b”时,这很好,但我不希望程序打印并且当用户输入“ab”时。switchwhile12 当用户输入包含多个字符的输入时,如何打印错误消息? #include <std...
作者:user21505321 提问时间:3/28/2023
import java.util.Scanner; public class DealCardsGNN{ public static void main(String[] args){ int nu...
作者:Chlaus 提问时间:11/12/2023
在学习编程时,我正在尝试有关 if 语句、开关和循环的简单活动,我遇到了这个问题。 while (1) { if (/*condition*/) { //error } else { swi...