标签:
switch (month) { case 2: printf("%d年的%d月有29天\n", year, month); break; case 4: case 6: case 9: case 11: printf("%d年的%d月有30天\n", year, month); break; case 1: case 3: case 5: case 7: case 8: case 10: case 12: printf("%d年的%d月有31天\n", year, month); break; default: break;
1 if(表达式){ 2 A; 3 }else{ 4 B; 5 }
C-switch语句, 逻辑运算符, 三元运算符, 指针与函数
标签:
原文地址:http://www.cnblogs.com/SquirrelStock/p/5347617.html