fengjing81 2020-08-02
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> //max函数 int max(int a, int b, int c) { int temp; if (a > b && a > c) temp = a; if (b > a && b > c) temp = b; if (c > a && c > b) temp = c; } int main() { int a, b, c; printf("请输入三个数字:"); scanf("%d%d%d",&a,&b,&c); printf("三个数字的最大值为: %d ", max(a, b, c)); return 0; }