两个整数比较大小,大神看看哪里有问题。
#include<stdio.h>
int main()
{
int max(int x, int y);
int a, b, c;
scanf("%d,%d", &a, &b);
c = max(a, b);
printf("is %d\n", c);
}
int max(int x, int y)
{
int z;
if (x > y) z = x;
else z = y;
return(z);
}
#include<stdio.h>
int main()
{
int max(int x, int y);
int a, b, c;
scanf("%d,%d", &a, &b);
c = max(a, b);
printf("is %d\n", c);
}
int max(int x, int y)
{
int z;
if (x > y) z = x;
else z = y;
return(z);
}
举报