第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

模擬ATM機的錯誤為什么提示switch expected

模擬ATM機的錯誤為什么提示switch expected

C
BITEyou 2017-09-18 20:20:06
//模拟ATM机 #include<stdio.h> main() {     printf("=============================="               "  |          Please select key:                  |"               "  |          1.Quary                                    |"               "  |          2.Credit                                    |"               "  |          3.Debit                                     |"               "  |          4.Return                                   |"              "   ==============================="               );     int i,j,k;     scanf("%d",&i);     switch(i)     case 1:     printf(    "=======================" " |   your balance is$1000.     |" " |   Press any key to return...   |" " |                                                 |" "   =======================" );     case 2:     printf(     "========================="   "  |Please select Credit money:   |" "   | 1.$50                                       |"   "  | 2.$100                                       |" "   | 3.return                                     |"    " =========================  "     );     scanf("%d",&j);    switch(j)    {    case 1: printf("   your Credit money is $50,thank you !"        "Press any key to retuen...");break        case 2:        printf("   your Credit money is $100,thank you !"        "Press any key to retuen...");break        case 3:        printf("thank you for your using !"               "good bye");break    }    case 3:    printf("Please select debit money:"           "1.$50"           "2.$100"           "3.$500"           "4.$1000"           "5.return"           );           scanf("%d",&k);           switch(k)           {               case 1:               printf("your debit money is $50,thank you"                      "Press any key to return");break              case 2:                 printf("your debit money is $100,thank you"                      "Press any key to return");break               case 3:                 printf("your debit money is $500,thank you"                      "Press any key to return");break                 case 4:                   printf("your debit money is $1000,thank you"                      "Press any key to return");break               case 5:               printf("thank you for your using !"                      "good bye");break           } }
查看完整描述

3 回答

已采納
?
暗域天堂

TA貢獻27條經(jīng)驗 獲得超13個贊

//模擬ATM機
#include<stdio.h>
main()
{
??? printf(
??? "? |===============================================|\n"
??? "? |????????? Please select key:?????????????????? |\n"
??? "? |????????? 1. Quary???????????????????????????? |\n"
??? "? |????????? 2. Credit??????????????????????????? |\n"
??? "? |????????? 3. Debit???????????????????????????? |\n"
??? "? |????????? 4. Return??????????????????????????? |\n"
??? "? |===============================================|\n"
??? );
??? int i,j,k;
??? scanf("%d",&i);
??? switch(i)
??? {
??????? case 1:
??????????? printf(
??????????? "? |===============================================|\n"
??????????? "? |??????? your balance is 1000.????????????????? |\n"
??????????? "? |??????? Press any key to return...???????????? |\n"???????? ?
??????????? "? |===============================================|\n"
??????????? );
??????????? break;
??????? case 2:
??????????? printf(
??????????? "? |===============================================|\n"
??????????? "? |??????? Please select Credit money:??????????? |\n"
??????????? "? |????????? 1. 50??????????????????????????????? |\n"
??????????? "? |????????? 2. 100?????????????????????????????? |\n"
??????????? "? |????????? 3. return??????????????????????????? |\n"
??????????? "? |===============================================|\n"
??????????? );
??????????? scanf("%d",&j);

??????????? switch(j)
??????????? {
??????????????? case 1:
??????????????????? printf("?? your Credit money is $50,thank you !\n"
?????????????????????????? "Press any key to retuen...\n");
??????????????????? break;
??????????????? case 2:
??????????????????? printf("?? your Credit money is $100,thank you !\n"
????????????????????????? "Press any key to retuen...\n");
??????????????????? break;
??????????????? case 3:
?????????????????? printf("thank you for your using !\n"
????????????????????????? "good bye\n");
?????????????????? break;
??????????? }
??????????? break;
??????? case 3:
??????? printf("Please select debit money:\n"
??????????????? "?????? 1.$50\n"
??????????????? "?????? 2.$100\n"
??????????????? "?????? 3.$500\n"
??????????????? "?????? 4.$1000\n"
??????????????? "?????? 5.return\n"
??????? );
??????? scanf("%d",&k);
??????? switch(k)
??????? {
??????????? case 1:
??????????????? printf("your debit money is $50,thank you\n"
????????????????????? "Press any key to return\n");
??????????????? break;
??????????? case 2:
?????????????? printf("your debit money is $100,thank you\n"
???????????????????? "Press any key to return\n");
?????????????? break;
??????????? case 3:
?????????????? printf("your debit money is $500,thank you\n"
???????????????????? "Press any key to return\n");
?????????????? break;
??????????? case 4:
?????????????? printf("your debit money is $1000,thank you\n"
???????????????????? "Press any key to return\n");
?????????????? break;
??????????? case 5:
??????????????? printf("thank you for your using !\n"
?????????????????????? "good bye\n");
??????????????? break;
??????? }
??? }
}

查看完整回答
反對 回復 2017-09-19
  • onemoo
    onemoo
    如果你發(fā)帖時用格式化工具來格式化代碼的話,看著會更舒服。
?
暗域天堂

TA貢獻27條經(jīng)驗 獲得超13個贊

你的代碼應該寫的規(guī)范一點


查看完整回答
反對 回復 2017-09-19
  • 3 回答
  • 0 關(guān)注
  • 1672 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號