switch和while嵌套例题

switch和while嵌套例题你的choice类型不对,有两种修改方式.把 choice 改成 char 型,switch 中 case 换成字符:#includeint main(void)(ch

switchwhile 和嵌套例题 choice 你的类型不对,有两种修改方式 1 .choice char switch case #include 把改成 型,中 换成字符: int main(void) ( char choice; while ((choice=getchar()) != #) switch (choice) ( case T: HH printf(you choice one.\n); break; case 2: H printf(you choice twoAn"); break; case 3: n printf(you choice threeAn"); break; case 4: nH printf(you choice four.\n); break; default: H printf("you choice quit.\n); break; ) H printf("you have quit the program.\n);

腾讯文库switch和while嵌套例题