用c语言写一个三个整数比较大小
#include <stdio.h>
int main() { int a, b, c; printf("请输入三个整数,用空格隔开:\n"); scanf("%d %d %d", &a, &b, &c); if (a > b && a > c) { printf("%d 最大\n", a); } else if (b > a && b > c) { printf("%d 最大\n", b); } else { printf("%d 最大\n", c); } return 0; }
原文地址: https://www.cveoy.top/t/topic/3OA 著作权归作者所有。请勿转载和采集!