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