0
Follow
0
View

开关情况

falwyvemmmm 注册会员
2023-02-28 13:34
dadawfj 注册会员
2023-02-28 13:34

x=20; =10 is valid, enter case1(where 0 represents false and 1 represents true)
and then judge x> =30 does not hold, enter case0, y=62

xingaiping 注册会员
2023-02-28 13:34

Where's the loop? It's a sequential structure, there's no loop.
You don't even have branches and loops.
You can think of switch as a bunch of ifs, Whatever expression is in the switch will enter the corresponding case, x=20 x> =10 is 1, how can I execute case 0, I have to execute case 1

About the Author

Question Info

Publish Time
2023-02-28 13:34
Update Time
2023-02-28 13:34