在编写过程中,我首先遇到了忘记写返回值的错误,之后发生了scanf()的报错
经过这次编写让我更加深刻的体会到了代码的魅力
#include<stdio.h>
int Max(int x, int y)
{
if(x>y){
int z = x;
return z;
}
else
{
int z = y;
return z;
}
}
int main()
{
int a = 0;
int b = 0;
int max = 0;
printf("输入a b\n");
scanf_s("%d %d", &a, &b);
max = Max(a, b);
printf("max=%d\n", max);
return 0;
}