您的位置:首页 > 其它

自学习指针后,自己利用指针编写判断三个数的大小。

2015-09-16 17:30 288 查看
//自己把指针看懂后,编的的小程序,分享下小喜悦。
#import

int abc(*p1,t*p2,*p3)
{
int temp=*p1;
if (temp<*p2) {
temp=*p2;
}
if (temp<*p3) {
temp=*p3;
}

return temp;
}

int main(int argc, const char * argv[])
{

@autoreleasepool {
int *p1,*p2,*p3;
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
p1=&a;
p2=&b;
p3=&c;

int temp=abc(p1,p2,p3);
printf("%d",temp);

}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: