课程来自慕课网DavidChin老师
switch分支语句
int main(int argc, const char * argv[]) {
@autoreleasepool {
int i = 10;
switch (i) {
case 1:
NSLog(@"i=1");
break;
case 2:
NSLog(@"i=2");
break;
default:
NSLog(@"i!=1 && i!=2");
break;
}
}
}