首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

C言中switch语句_switch在c言中

本篇文章帮大家学习c语言switch语句,包含了C语言switch语句使用方法、操作技巧、实例演示和注意事项,有一定的学习价值,大家可以用来参考。 C言中的switch语句用于从多个条件执行代码。...C言中switch语句的语法如下: switch(expression){ case value1: //code to be executed; break; //optional case value2...code to be executed; break; //optional …… default: code to be executed if all cases are not matched; } C言中...2.5) case ‘a’; case x; switch(a+b-2) case 1+2; case x+2; switch(func(x,y)) case ‘x’>’y’; case 1,2,3; C言中的...equal to 10, 50 or 100 执行第二次,结果如下 – Enter a number:50 number is equal to 50 请按任意键继续. . . switch语句直通到尾 在C言中

2.4K10
领券