mirror of
https://github.com/foxsen/archbase.git
synced 2026-04-25 19:11:52 +08:00
initial import to public repository
This commit is contained in:
17
materials/chapter2/switch_case.c
Normal file
17
materials/chapter2/switch_case.c
Normal file
@@ -0,0 +1,17 @@
|
||||
int st(int a, int b, int c)
|
||||
{
|
||||
switch (a) {
|
||||
case 15:
|
||||
c = b & 0xf;
|
||||
case 10:
|
||||
return c + 50;
|
||||
case 12:
|
||||
case 17:
|
||||
return b + 50;
|
||||
case 14:
|
||||
return b;
|
||||
default:
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user