C语言求解werwerwe.cpp(6) : see declaration of 'high

学习 时间:2026-04-02 17:38:51 阅读:6080
C语言求解werwerwe.cpp(6) : see declaration of 'high#include#includeint main(){\x09int a,b,c,d;\x09int high(int,int);\x09scanf("%d%d%d%d",&a,&b,&c,&d);\x09int high(a,b);\x09int high(a,c);\x09int high(a,d);\x09int high(b,c);\x09int high(b,d);\x09int high(c,d);\x09printf("%d,%d,%d,%d\n",a,b,c,d);\x09return 0;}int high(int x,int y){\x09int max;\x09if (y>x)\x09{\x09\x09max=y;\x09\x09y=x;\x09\x09x=max;\x09}\x09return 0;}

最佳回答

帅气的盼望

谦让的小松鼠

2026-04-02 17:38:51

调用函数不能加上返回类型high(a,b);high(a,c);这样才对。另外,你这个函数是交换两个数吧?把大数放在后面?你这样是交换不成功的,在函数声明里面这样写就行了int high(int&,int&);

最新回答共有2条回答

  • 繁荣的萝莉
    回复
    2026-04-02 17:38:51

    调用函数不能加上返回类型high(a,b);high(a,c);这样才对。另外,你这个函数是交换两个数吧?把大数放在后面?你这样是交换不成功的,在函数声明里面这样写就行了int high(int&,int&);

上一篇 tom comes to school late than jim--

下一篇 925纯银和99足银 哪个好一些?