#include <stdio.h>

int main() {
    int a, b, c;
    printf("请输入三个整数:");
    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;
}
用c语言写从键盘上输入三个整数a、b、c先确定任意两个数的大小关系再用第三个数和其中较大的一个比较输出其中的最大者

原文地址: https://www.cveoy.top/t/topic/b7cF 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录