switch语句一:
#include <stdio.h>
void main()
{
int k=1;
switch (k)
{
case 1:
k+=1;
break;
case 2:
k+=2;
break;
case 3:
k+=3;
break;
default:
k+=4;
break;
}
printf("k=%d\n",k);
}
switch语句二
#include <stdio.h>
void main()
{
int k=1;
switch (k)
{
case 1:
k+=1;
case 2:
k+=2;
case 3:
k+=3;
break;
default:
k+=4;
}
printf("k=%d\n",k);
}