欢迎光临散文网 会员登陆 & 注册

switch 示例

2023-08-24 10:41 作者:sayllyNotFun  | 我要投稿

#include<iostream>

using namespace std;

int main()

{

int a;

cin>>a;

switch(a)

{

case 1:cout<<"one sheep";break;

case 2:cout<<"two sheep";break;

case 3:cout<<"three sheep";break;

default:cout<<"how duo sheep";break;

}

}


switch 示例的评论 (共 条)

分享到微博请遵守国家法律