int max(int a, int b)
{
if (a>b)
return a;
else
return b;
}
int main()
{
int a, b, max;
scanf("%d%d", & a, & b);
max = (a, b);
printf("%d\n", max);
return 0;
} scanf()中双引号的位置错了
scanf(“%d %d”,&a,&b); MAX要自己定义 我竟然是这么写的
if(a>b)
;
else
a = b;
return a; #include<stdio.h>
int my_max(int a,int b){ return a>b?a:b;}
main()
{
int x,y,z;
printf("input two numbers:\n");
scanf("%d%d",&x,&y);
z=my_max(x,y);
printf("max mum = %d\n",z);
}
帮你改了改,试过可行{:9_240:}
页:
1
[2]