用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/hq4H 著作权归作者所有。请勿转载和采集!