可否告诉我为何b=3
可否告诉我为何b=3
程序代码:
#include <stdio.h> #include <string.h> #include <stdlib.h> int main() { int a, b = 0; for (a = 10; a<20; a+=1) { if (a/15 == 0) { switch (a%4) { case 0: b += 1; break; case 1: b += 2; break; } } } printf("a=%d b=%d",a, b); system("pause"); return 0; }