比较四个数的大小
#include<stdio.h> int main() { int a, b,c,d, t; printf("请输入四个数a,b,c,d:\n"); scanf_s("%d%d%d%d", &a, &b,&c,&d); if (a > b) { t = a; a = b; b = t; } if (b > c) { t = b; b = c; c = t; } if (c > d) { t = c; c = d; d = t; } printf("最大数为%d\n", d); }
本文来自博客园,作者:木子欢儿,转载请注明原文链接:https://www.cnblogs.com/HGNET/p/11806139.html