标题:麻烦看一下程序哪里出错了
取消只看楼主
feiyue323
Rank: 2
等 级:论坛游民
威 望:1
帖 子:35
专家分:18
注 册:2016-9-16
结帖率:87.5%
已结贴  问题点数:10 回复次数:1 
麻烦看一下程序哪里出错了
#include<stdio.h>
int mul(int a,int b);
main()
{
    int a,b,c;
    a=5;
    b=10;
    c=mul(a,b);
    printf("multiplication of %d and %d is %d",a,b,c);
}
     int mul(int x,int y)
     int p;
     {
         p=x*y;
         return(p);
     }/*十月九号.C
E:\Microsoft Visual Studio\MyProjects\十月九号\十月九号.C(12) : error C2085: 'p' : not in formal parameter list
E:\Microsoft Visual Studio\MyProjects\十月九号\十月九号.C(14) : error C2065: 'p' : undeclared identifier
执行 cl.exe 时出错.*/
搜索更多相关主题的帖子: Microsoft include return formal 
2016-10-09 18:26
feiyue323
Rank: 2
等 级:论坛游民
威 望:1
帖 子:35
专家分:18
注 册:2016-9-16
得分:0 
int p 应该放在里面
2016-10-09 18:41



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




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

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