| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 525 人关注过本帖
标题:求助,这个程序在我的机器上无法运行,为什么啊?
取消只看楼主 加入收藏
avg126
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2012-3-13
结帖率:0
收藏
已结贴  问题点数:20 回复次数:3 
求助,这个程序在我的机器上无法运行,为什么啊?
main()
{
    float aa[58]={1.194,-0.058,0.7,1.08,0,89.09,0,4.34,-0.57,-2.5,31,-0.01,7.62,93.7,-2.5,1,-0.19,1,8.3,-0.368,0.289,-0.3,1.34,8.63,1.52,1.15,0.72,7.43,0.7,-0.01,1.4,1.61,-0.12,5.22,0.15,1.29,0.946,0.687,-0.35,0.343,100,0.4,14.1,8.82,4.349,1.05,0.52,1.34,-0.06,0.937,-0.06,14.53,-0.01,1.4,0.938,4.349,-1.895,121.9};
float rr[58]={0.795,0,0.95,1.05,1,174.2,1,26.66,-1.29,-1.2,124,0.02,6.81,250.4,-1.2,0.7,0.03,1.7,8.7,-1.03,1.38,-0.09,0.95,6.75,1.49,1.06,1.33,4.51,0.8,0.02,1.2,0.4,0.34,7.3,-0.37,0.44,1.128,0.59,-0.44,0.353,65,0.3,5.5,3.71,4.396,0.81,0.68,0.95,0.02,1.725,0.02,17.82,0.02,2.1,1.137,4.396,-1.475,121.4};
float nn[58]={0.659,0.027,1.47,0.85,1,132.12,1,13.28,0.02,4.6,56,0.41,6.17,146.3,4.6,0.6,0.02,1,3.7,0,3.169,-0.12,2.49,4.18,0.58,0.87,1.38,9.12,0.8,0.41,1.2,0.73,1.05,6.06,0.69,0.81,0.432,0.489,-0.38,0.409,134,0.9,3.2,6.77,4.755,0.91,0.76,2.49,0.1,1.08,0.1,13.59,0.41,0.9,0.902,4.755,-1.56,117.5};
float dd[58]={1.056,0.016,0.87,0.85,1,133.1,1,12,-1.54,0,54,-0.09,6.18,142.6,0,0.5,-0.06,0.7,4.7,2.06,0.917,0.44,3.32,6.24,1.04,1,1.04,8.71,0.6,-0.09,0.6,0.75,1.12,7.91,-0.22,2.02,1.311,0.632,-0.41,0.429,106,0.8,5.7,6.38,4.765,1.39,0.76,3.32,0.24,1.64,0.24,19.78,-0.09,0.7,0.857,4.765,-1.518,121.2};
float cc[58]={0.678,0.447,1.17,0.95,0,121.15,0,35.77,-0.3,-4.7,55,-0.27,10.93,135.2,-4.7,1.9,-0.29,1,1.6,4.53,1.767,0.03,1.07,1.03,0.26,1.03,1.01,0.42,0.2,-0.27,1.6,0.37,-0.63,1.01,-0.19,0.66,0.481,0.263,-0.47,0.319,20,0.5,0.1,0.9,4.686,0.6,0.62,1.07,-0.19,1.004,-0.19,30.57,-0.27,1.2,0.686,4.686,-2.035,113.7};
float qq[58]={1.29,-0.073,0.73,0.95,1,146.15,1,17.56,-0.71,-0.5,85,0.01,6.67,177.7,-0.5,1,0.02,1,4.7,0.731,2.372,0.24,1.49,4.76,1.41,1.43,0.81,5.42,1.3,0.01,1.4,0.61,1.67,6,-0.06,1.22,1.615,0.527,-0.4,0.395,93,0.7,3.7,3.89,4.373,0.87,0.68,1.49,-0.04,1.078,-0.04,22.18,0.01,1.6,0.916,4.373,-1.521,118};
float ee[58]={0.928,-0.128,0.96,1.15,1,147.13,1,17.26,-1.17,-4.4,83,0.09,6.38,182.9,-4.4,0.7,-0.1,0.7,6.5,1.77,0.285,0.18,2.2,7.82,1.76,1.37,0.75,5.86,1.6,0.09,0.9,1.5,0.91,10.66,0.14,2.44,0.698,0.669,-0.41,0.405,102,1.3,8.8,4.05,4.295,1.11,0.68,2.2,-0.04,0.679,-0.04,18.19,0.09,1.7,1.139,4.295,-1.535,118.2};
float gg[58]={1.015,0.331,0.64,0.55,0,75.07,0,0,-0.48,4.9,3,0.13,7.31,52.6,4.9,0.3,0.19,1.5,6.3,-0.525,4.259,-0.12,2.07,6.8,0.3,0.64,1.35,9.4,0.1,0.13,0.6,3.12,0.76,5.81,0.36,0.76,0.36,0.67,0,0.389,49,0,4.1,9.11,3.972,1.26,0,2.07,0.17,0.901,0.17,37.16,0.13,0.2,0.892,3.972,-1.898,0};
float hh[58]={0.611,0.195,1.39,1,1,155.16,1,21.81,0.1,1.6,96,0.22,7.85,188.1,1.6,0.8,-0.16,1,2.1,0,1.061,-0.2,1.27,2.7,0.83,0.95,0.76,1.49,1.1,0.22,0.9,0.46,1.34,2.27,-0.25,0.73,2.168,0.594,-0.46,0.307,66,1,2,1.77,4.63,1.43,0.7,1.27,0.19,1.085,0.19,22.63,0.22,1.8,1.109,4.63,-1.755,118.2};
float ii[58]={0.603,0.06,1.29,1.05,1,131.17,1,19.06,1.31,-3.3,111,-0.27,9.99,182.2,-3.3,4,-0.08,1,3.7,0.791,0.262,-0.07,0.66,3.48,1.25,0.99,0.8,1.76,1.4,-0.27,0.9,1.61,-0.77,2.36,0.02,0.67,1.283,0.564,-0.56,0.296,96,0.4,7.1,5.05,4.224,0.95,1.02,0.66,-0.2,0.178,-0.2,20.28,-0.27,0.4,0.986,4.224,-1.951,118.9};
float ll[58]={0.595,0.138,1.44,1.25,2,131.17,2,18.78,2.16,-2,111,-0.25,9.37,173.7,-2,2,-0.42,1,7.4,1.07,0,-0.18,0.54,8.44,1.26,1.22,0.63,2.74,1.9,-0.25,1.1,1.37,0.15,4.52,0.06,0.58,1.192,0.541,-0.48,0.287,40,0.6,9.1,6.54,4.385,0.96,0.98,0.54,-0.46,0.808,-0.46,14.3,-0.25,0.8,1,4.385,-1.966,118.1};
float kk[58]={1.06,-0.112,0.91,1.15,1,146.19,1,21.29,-1.02,-0.8,119,0.08,5.72,215.2,-0.8,0.7,-0.09,1.7,7.9,0,1.288,0.06,0.61,6.25,1.1,1.2,0.84,9.67,2.2,0.08,1.9,0.62,0.29,12.68,-0.16,0.66,1.203,0.407,-0.41,0.429,56,0.4,7.7,5.45,4.358,0.97,0.68,0.61,-0.43,1.254,-0.43,14.07,0.08,1.9,0.952,4.358,-1.374,122};
float mm[58]={0.831,0.275,0.91,1.15,1,149.21,1,21.64,2.55,-4.1,105,-0.57,9.83,197.6,-4.1,1.9,-0.38,1,2.3,0.656,0,-0.44,0.7,2.14,1.14,1.45,0.62,0.6,1,-0.57,1.7,1.59,-0.71,1.85,0.11,0.71,0,0.328,-0.46,0.293,94,0.3,3.3,1.62,4.513,0.99,0.78,0.7,-0.52,0.886,-0.52,20.61,-0.57,1.3,1.077,4.513,-1.963,113.1};
float ff[58]={0.377,0.24,1.34,1.1,1,165.19,1,29.4,1.42,-4.1,132,-0.12,8.99,228.6,-4.1,3.1,-0.32,1,2.7,1.06,0.393,0.11,0.8,2.73,1.14,0.92,0.58,1.18,1.8,-0.12,1,1.24,-0.67,1.68,1.18,0.61,0.963,0.577,-0.55,0.292,41,0.7,5,3.51,4.663,0.95,0.7,0.8,-0.33,0.803,-0.33,19.61,-0.12,0.3,1.11,4.663,-1.864,118.2};
float pp[58]={3.159,-0.478,0.12,0.71,0,115.13,0,10.93,0.11,5.8,32.5,0.26,6.64,0,5.8,0.2,0.05,0.1,6.9,-2.24,0,0.77,2.12,6.28,0.44,0.72,1.43,5.6,0,0.26,0.3,0.67,0,5.7,0.11,2.01,2.093,0.6,-0.23,0.432,56,0.9,0.7,4.28,4.471,1.05,0.36,2.12,0.37,0.748,0.37,52.63,0.26,0.2,1.266,4.471,-1.699,81.9};
float ss[58]={1.444,-0.177,0.84,0.75,0,105.09,0,6.35,0.3,2.5,32,0.44,6.93,109.5,2.5,0.9,0.25,1,8.8,-0.524,0.16,-0.09,0.94,8.53,0.66,0.84,1.34,9.6,0.6,0.44,1.1,0.68,1.45,6.99,0.13,0.74,0.523,0.692,-0.39,0.416,120,0.4,3.9,7.64,4.498,0.96,0.53,0.94,0.43,1.145,0.43,18.56,0.44,1.6,0.956,4.498,-1.753,117.9};
float tt[58]={1.172,-0.163,0.74,0.75,0,119.12,0,11.01,0.99,1.7,61,0.35,7.08,142.1,1.7,1.7,0.22,1,5.1,0,0.218,-0.27,1.09,4.43,0.73,0.97,1.03,8.95,0.7,0.35,0.6,0.92,-0.7,5.16,0.28,1.08,1.961,0.713,-0.48,0.362,97,0.4,4.4,7.12,4.346,1.03,0.5,1.09,0.5,1.487,0.5,21.09,0.35,0.9,1.018,4.346,-1.767,117.1};
float ww[58]={0.452,0.564,1.8,1.1,1,204.24,1,42.53,1.35,1.2,170,-0.15,8.41,271.6,1.2,2.2,-0.19,1,0.7,1.6,0,-0.09,-4.65,0.8,0.68,1.11,0.87,1.18,0.4,-0.15,1.4,1.63,-0.14,0.56,-0.12,1.47,1.925,0.632,-0.48,0.268,18,0.6,1.2,1.96,4.702,1.06,0.7,-4.65,-0.32,0.803,-0.32,19.78,-0.15,0.4,0.971,4.702,-1.869,118.4};
float yy[58]={0.816,0.322,1.68,1.1,1,181.19,1,31.53,0.2,-0.6,136,0.15,8.53,239.9,-0.6,2.8,0.05,1,2.4,4.91,0.654,-0.25,-0.17,2.54,1.04,0.72,1.35,3.26,1.1,0.15,0.2,0.67,-0.49,2.16,0.19,0.68,0.802,0.495,-0.5,0.22,41,1.2,4.5,4.85,4.604,0.94,0.7,-0.17,0.35,1.227,0.35,26.36,0.15,0.3,1.157,4.604,-1.686,110};
float vv[58]={0.64,-0.052,1.2,0.95,0,117.15,0,13.92,-0.79,-3.5,84,-0.09,10.38,157.2,-3.5,4,-0.15,1,5.3,0.401,0.167,-0.06,1.32,5.44,1.03,0.82,0.83,3.1,1.3,-0.09,0.8,1.3,-0.7,4.1,-0.08,0.61,0.409,0.529,-0.53,0.307,74,0.4,5.9,6.6,4.184,0.62,0.76,1.32,0,0.625,0,21.87,-0.09,0.7,0.959,4.184,-1.981,121.7};
//以上定义了21个一维数组,每个数组代表相应字母所对应的性质的数值,每个字母均有58个性质
float bb[21][58];  //定义了1个二维数组
float y;  //定义了1个变量
float x[59]={-0.610,0.987,0.630,1.701,0.368,0.000,0.226,0.025,-0.104,-0.021,0.004,-0.633,-2.228,0.003,-0.044,-0.135,-1.181,0.332,-0.036,0.076,0.110,0.426,-0.095,0.067,-0.365,-0.865,0.788,-0.027,0.121,-0.720,0.301,0.201,0.145,-0.034,-0.305,-0.306,-0.123,-0.545,0.745,2.039,-0.002,0.300,-0.021,-0.062,0.348,-0.388,0.350,0.079,-0.371,0.225,-0.369,-0.009,0.522,-0.151,-0.597,0.269,0.359,0.002,11.814};
  //定义了1个一维数组,这个数组里面的值是最终判别函数y=ax1+bx2+……+zx58+a0中的系数和常数项对应的值
 char st[21]; //定义了1个字符串
   int i,j,t;  //定义了3个整型变量
           printf("input the sequence\n");  //输出:input the sequence
    for(i=0;i<22;i++)
  {
    scanf("%c",&st[i]);
    printf("%c",st[i]);
  }  
  //将输入的序列赋值给字符串st
  
  for (t=0;t<22;t++) //从字符串的第一个字母开始,给二维数组bb赋值,当第一个字母为A或a时,将数组aa赋值给bb的第一行,否则,若第一个字母为c时,则将cc数组的值赋值给二维数组bb的第一行,以此类推,当第i个字母为s时,则将ss数组赋值给二维数组bb的第i行
  {if (st[t]=='A'||st[t]=='a')
  {for (j=0;j<58;j++)
      bb[t][j]=aa[j];
  }
  else if (st[t]=='r'||st[t]=='R')
  {for (j=0;j<58;j++)
      bb[t][j]=rr[j];
  }
  else if (st[t]=='o'||st[t]=='O')
  {for (j=0;j<58;j++)
      bb[t][j]=oo[j];
  }
  
  else if (st[t]=='N'||st[t]=='n')
  {for (j=0;j<58;j++)
      bb[t][j]=nn[j];
  }
  else if (st[t]=='d'||st[t]=='D')
  {for (j=0;j<58;j++)
      bb[t][j]=dd[j];
  }
  
  else if (st[t]=='c'||st[t]=='C')
  {for (j=0;j<58;j++)
      bb[t][j]=cc[j];
  }
  else if (st[t]=='q'||st[t]=='Q')
  {for (j=0;j<58;j++)
      bb[t][j]=qq[j];
  }
  
  else if (st[t]=='e'||st[t]=='E')
  {for (j=0;j<58;j++)
      bb[t][j]=ee[j];
  }
  else if (st[t]=='g'||st[t]=='G')
  {for (j=0;j<58;j++)
      bb[t][j]=gg[j];
  }
  
  
  else if (st[t]=='h'||st[t]=='H')
  {for (j=0;j<58;j++)
      bb[t][j]=hh[j];
  }
  else if (st[t]=='i'||st[t]=='I')
  {for (j=0;j<58;j++)
      bb[t][j]=ii[j];
  }
  
  else if (st[t]=='l'||st[t]=='L')
  {for (j=0;j<58;j++)
      bb[t][j]=ll[j];
  }
  else if (st[t]=='k'||st[t]=='K')
  {for (j=0;j<58;j++)
      bb[t][j]=kk[j];
  }
  else if (st[t]=='M'||st[t]=='m')
  {for (j=0;j<58;j++)
      bb[t][j]=mm[j];
  }
  else if (st[t]=='f'||st[t]=='F')
  {for (j=0;j<58;j++)
      bb[t][j]=ff[j];
  }
  
  else if (st[t]=='p'||st[t]=='P')
  {for (j=0;j<58;j++)
      bb[t][j]=pp[j];
  }
  else if (st[t]=='S'||st[t]=='s')
  {for (j=0;j<58;j++)
      bb[t][j]=ss[j];
  }
  
  else if (st[t]=='t'||st[t]=='t')
  {for (j=0;j<58;j++)
      bb[t][j]=tt[j];
  }
  else if (st[t]=='w'||st[t]=='W')
  {for (j=0;j<58;j++)
      bb[t][j]=ww[j];
  }
  
  else if (st[t]=='y'||st[t]=='Y')
  {for (j=0;j<58;j++)
      bb[t][j]=yy[j];
  }
  else if (st[t]=='v'||st[t]=='V')
  {for (j=0;j<58;j++)
      bb[t][j]=vv[j];
   }
  }
 //二维数组bb赋值完成
  y=x[0]*bb[13][0]+x[1]*bb[9][1]+x[2]*bb[11][2]+x[3]*bb[20][3]+x[4]*bb[9][4]+x[5]*bb[2][5]+x[6]*bb[12][6]+x[7]*bb[8][7]+x[8]*bb[9][8]+x[9]*bb[17][9]+x[10]*bb[0][10]+x[11]*bb[3][11]+x[12]*bb[10][12]+x[13]*bb[15][13]+x[14]*bb[14][14]+x[15]*bb[13][15]+x[16]*bb[18][16]+x[17]*bb[7][17]+x[18]*bb[6][18]+x[19]*bb[12][19]+x[20]*bb[8][20]+x[21]*bb[11][21]+x[22]*bb[19][22]+x[23]*bb[8][23]+x[24]*bb[20][24]+x[25]*bb[15][25]+x[26]*bb[14][26]+x[27]*bb[5][27]+x[28]*bb[19][28]+x[29]*bb[14][29]+x[30]*bb[15][30]+x[31]*bb[0][31]+x[32]*bb[18][32]+x[33]*bb[18][33]+x[34]*bb[13][34]+x[35]*bb[4][35]+x[36]*bb[16][36]+x[37]*bb[9][37]+x[38]*bb[20][38]+x[39]*bb[9][39]+x[40]*bb[6][40]+x[41]*bb[4][41]+x[42]*bb[12][42]+x[43]*bb[2][43]+x[44]*bb[0][44]+x[45]*bb[1][45]+x[46]*bb[17][46]+x[47]*bb[4][47]+x[48]*bb[11][48]+x[49]*bb[11][49]+x[50]*bb[9][50]+x[51]*bb[14][51]+x[52]*bb[18][52]+x[53]*bb[3][53]+x[54]*bb[8][54]+x[55]*bb[8][55]+x[56]*bb[3][56]+x[57]*bb[5][57]+x[58];
//将数值代入判别方程,计算其值
if (y>0)
printf("1/n");
else
printf("0/n");
//若y大于0,则输出1,否则,输出0
}
搜索更多相关主题的帖子: 100 
2012-03-13 20:15
avg126
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2012-3-13
收藏
得分:0 
哎,我也不想这么长,个人水平有限啊
2012-03-13 20:23
avg126
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2012-3-13
收藏
得分:0 
以下是引用纯情小郎君在2012-3-13 20:18:08的发言:

哇,眼都花了,折腾啊
我想问一下,这个程序在你的电脑上能运行不?
我不知道是我电脑的问题还是啥,不能运行呢
2012-03-13 20:25
avg126
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2012-3-13
收藏
得分:0 
以下是引用lzm0707在2012-3-13 20:34:01的发言:

根据编译时提示的错误自己改一下吧,这是谁打的不嫌累啊。
关键编译时没有错误啊
2012-03-13 20:35
快速回复:求助,这个程序在我的机器上无法运行,为什么啊?
数据加载中...
 
   



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

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