switch(age)
{
case 16:
cout<<"hey you can"<<endl;
break;
case 18:
cout<<"go buy"<<endl;
break;
case 21:
cout<<"buy me"<<endl;
break;
default:
cout<<"sorry"<<endl;
}
switch(age)
{
case 16:
cout<<"hey you can"<<endl;
break;
case 18:
cout<<"go buy"<<endl;
break;
case 21:
cout<<"buy me"<<endl;
break;
default:
cout<<"sorry"<<endl;
}
本文标题:25 - switch
本文链接:https://www.haomeiwen.com/subject/kbxtnxtx.html
网友评论