c语言程序设计 定义一个函数求两个数的最大值,在住函数中调用该函数求...答:include<stdio.h> int max(int x,int y){ int t;t=x>y? x:y;return t;} void main(){ int a,b,c,m;printf("please input three numbers:\n");scanf("%d,%d,%d",&a,&b,&c);m=max(max(a,b),c);printf("the maximum of the three numbers is:%d\n",m);} ...
在C语言中如果不用if语句然后求两个数的最大值 三个数的最大值 四个...答:include<stdio.h> int main(){int a,b,c,d;scanf("%d%d%d",&a,&b,&c,&d);printf("max2=%d\n",a>b?a:b);printf("max3=%d\n",(a>b?a:b)>c?(a>b?a:b):c);printf("max4=%d\n",(a>b?a:b)>(c>d?c:d)?(a>b?a:b):(c>d?c:d));return 0;} ...