写一个C语言程序求三个数中最大值
#include <stdio.h>
int main() {
int a, b, c;
printf("请输入三个数:\n");
scanf("%d %d %d", &a, &b, &c);
int max = a;
if (b > max) {
max = b;
}
if (c > max) {
max = c;
}
printf("三个数中最大值为:%d\n", max);
return 0;
}
原文地址: https://www.cveoy.top/t/topic/bS3g 著作权归作者所有。请勿转载和采集!