我想准确地理解此代码的输出,即输出的最后2行(输出的第4行和第5行)。
#include <stdio.h>
#include <stdlib.h>
int main()
{
double x = 2.1;
while (x * x <= 50) {
switch ((int) x) {
case 6:
x--;
printf("case 6, x= %f\n ", x);
case 5:
printf("case 5, x=%f\n ", x);
case 4:
printf("case 4, x=%f\n ", x);
break;
default:
printf("something else, x=%f\n ", x);
} //end switch
x +=2;
} //end while
return 0;
}