返回列表 發帖
#include <iostream>
#include<cstdlib>
using namespace std;
int main() {
   
   int d;
re:
   cout<<"請問你上週共運動幾天?";
   cin>>d;
   switch(d){
case 0 ... 2:
   cout<<"有點少...加油!"<<endl;
   break;  
case 3 ... 4:
   cout<<" 還不錯,繼續努力!"<<endl;
   break;
case 5 ... 7:
   cout<<"健康寶寶代言人"<<endl;
   break;
default:
   cout<<"你不知道一週有幾天嗎?"<<endl;
   break;
   }
   goto re;
   

    system("pause");
    return 0;
}

TOP

返回列表