标题:哪里错了啊?
取消只看楼主
Arise
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2012-12-2
结帖率:60%
已结贴  问题点数:20 回复次数:0 
哪里错了啊?
#include <stdio.h>
void swap(int *p1,int *p2)
{
    int k;
    k=*p1;
    *p1=*p2;
    *p2=k;
}
void exchange (int *a1,int *a2,int*a3)
{

void  swap(int *p1,int *p2);
if(*a1<*a2)swap(a1,a2);
if(*a1<*a3)swap(a1,a3);
if(*a2<*a3)swap(a2,a3);
}
void main()
{
    void exchange (int *a1,int *a2,int*a3);
    int i1,i2,i3,*b1,*b2,*b3;
    printf("please input three number:");
    scanf("%d,%d,%d",i1,i2,i3);
    b1=&i1;b2=&i2;b3=&i3;
    exchange(b1,b2,b3);
    printf("the  order is:%d,%d,%d\n",i1,i2,i3);
}
搜索更多相关主题的帖子: include exchange please 
2012-12-12 11:25



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-390837-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.813540 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved