#include<stdio.h>
int larger1(int,int);
int *larger2(int*,int*);
void main()
{
int x,y,bigger1,*bigger2;
printf("请输入两个整数:");
scanf("%d,%d",&x,&y);
bigger1=larger1(x,y); /*函数larger1返回指向变量的值*/
printf("较大的数是:%d\n",bigger1);
bigger2=larger2(&x,&y); /*函数1argcr2返回指向整型变量的指针值*/
printf("较大的数是:%d\n",*bigger2);
}
int larger1(int a,int b) /*返回int型*/
{
return a>b?a:b;
}
int *larger2(int*a,int*b) /*返回指向int型的指针*/
{
return *a>*b?a:b;
}