湛蓝之海 发表于 2021-12-29 10:05:10

51CTO的日常

#include<stdio.h>
int main()
{
//int a, b, c, d, i;
//printf("请输入4个值: ");
//scanf_s("%d%d%d%d", &a,&b,&c,&d);
//if (a > b){ i = a; a = b; b = i; }
//if (a > c){ i = a; a = c; c = i; }
//if (a > d){ i = a; a = d; d = i; }//排第一个数
//if (b > c){ i = b; b = c; c = i; }
//if (b > d){ i = b; b = d; d = i; }//排第二个数
//if (c > d){ i = c; c = d; d = i; }//排第三、第四个数
//printf("%3d%3d%3d%3d", a,b,c,d);//打印出4个从小排到大的数

//int x;
//printf("请输入x的值进行函数选择: ");//打印进行语句输入
//scanf_s("%d", &x);//将x的地址存储起来
//switch (x)
//{
//case 1:
//printf("y=x\n");
//break;
//case 2:
//printf("y=2x-1\n");
//break;
//case 3:
//printf("y=3x-11\n");
//break;//每个语句加个break跳出switch语句避免进行下面的语句
//}

return 0;
}

https://blog.51cto.com/u_15463243/4853939
页: [1]
查看完整版本: 51CTO的日常