标题:编译错误 error: expected ')' before ';' token
取消只看楼主
a1067942077
Rank: 2
等 级:论坛游民
帖 子:36
专家分:11
注 册:2016-10-15
结帖率:38.46%
已结贴  问题点数:18 回复次数:1 
编译错误 error: expected ')' before ';' token
#include<stdio.h>
#include<math.h>
int main()
{
   double sum=0;
   int i,j;
   int n;
   scanf("%d",&n);
   for(i=1,j=2;i<=n;i++;j++)
   {
      sum+=i/j;
   }
   printf("%.2lf",sum);
}
 
错误如下F:\123\main.cpp|9|error: expected ')' before ';' token|
        F:\123\main.cpp|9|error: expected ';' before ')' token|
搜索更多相关主题的帖子: expected include before double 
2016-10-21 14:34
a1067942077
Rank: 2
等 级:论坛游民
帖 子:36
专家分:11
注 册:2016-10-15
得分:0 
发现了  
2016-10-21 14:38



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




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

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