#include<stdio.h>
#define N8int main(){ int x = 2, z = 1; double y = 1.2; switch (x) { case 2:y++; break; case ‘0’:y = 3; } printf("%f\n", y); return 0;}
#include<stdio.h>
int main(){ int x, y; printf(“输出一个数:”); scanf_s("%d", &x); switch (x-abs(x)) { case 0:y = 1; break; default:y = -1; } printf("%d\n", y); return 0;}
#include<stdio.h>
int main(){ int i = 1, n = 0; switch (i) { case 1: case 2:n++; case 3:n++; } printf("%d", n); return 0;}
#include<stdio.h>
int main(){ float a, b; scanf_s("%f", &b); if (b < 10000) a = 1000; else if (b < 20000) a = 1000 + (b - 10000) * 0.05; else if (b < 50000) a = 1000 + (b - 20000) * 0.06; else if (b < 100000) a = 1000 + (b - 50000) * 0.07; else a = 1000 + (b - 100000) * 0.08; printf("%.3f\n",a); return 0;}