标题:帮忙看下程序,求指点.....................
取消只看楼主
C_596322153
Rank: 6Rank: 6
来 自:徽州
等 级:侠之大者
帖 子:182
专家分:466
注 册:2012-1-10
结帖率:100%
已结贴  问题点数:20 回复次数:1 
帮忙看下程序,求指点.....................
#include "stdio.h"
void main()
{
  int M;
  double i,j,m,Tong,;
  double Dinge[7][5]={13.37,8.85,4.48,1.85,34.22,
                      18.14,9.75,4.89,1.98,36.00,
                      27.06,13.68,5.50,2.35,41.02,
                      45.02,19.40,5.50,2.84,47.70,
                      71.93,22.93,9.16,3.22,52.94,
                      108.23,26.76,9.16,3.64,58.63,
                      175.22,46.99,27.49,4.98,98.22};
   scanf("%d",&i);
   printf("\n");
   scanf("%d",&M);
   m=M/1000.0;
   Tong=Dinge[i][0]*m;
      printf("7.2f",Tong);
}
错误信息:
: error C2059: syntax error : ';'
: error C2108: subscript is not of integral type
: error C2296: '*' : illegal, left operand has type 'double [5]'
Error executing cl.exe.
搜索更多相关主题的帖子: void include double 
2012-02-02 13:46
C_596322153
Rank: 6Rank: 6
来 自:徽州
等 级:侠之大者
帖 子:182
专家分:466
注 册:2012-1-10
得分:0 
知道了 是
改为:int M,i,j;
      double m,Tong;
      ....
2012-02-02 14:15



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




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

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