用函数比较两个数的大小
#include<stdio.h>
#pragma warning(disable:4996)
int Max(int a,int b)
{
int max = 0;
if (a > b)
max = a;
else
{
max = b;;
}
return max;
}
int main()
{
int a = 0;
int b = 0;
int max = 0;
printf("请输入两个数\n");
scanf("%d%d", &a, &b);
max = Max(a, b);
printf("较大数为:%d\n", max);
system("pause");
}