/* 调用函数时的数据传递 */
#include <stdio.h>
int main()
{
int max(int x, int y); /* 对max函数的声明 */
int a, b, c;
scanf_s("%d,%d", &a, &b);
c = max(a, b);
printf("Max is %d\n\n", c);
return 0;
}
int max(int x, int y) /* 定义有参函数max */
{
int z;
z = x > y ? x : y;
return(z);
}
第八章 例8.2
最新推荐文章于 2020-11-18 11:45:58 发布