没有正确执行

时间:2015-10-13 17:33:30

标签: java eclipse for-loop syntax-error

因此,我正在制定一个民意调查计划,该计划将采取所有选择(a或b)并将其容忍为百分比。这一切都有效,但输出(下面的图片)任何帮助都将非常受欢迎。The result

问题出在这里,但我找不到          for(int at = 0;在Answere_1)然后将其设置为比率              {                  的System.out.println(AT);                  if(y [at]> y [at + 1])                  {                      y [at] / = counter;                      y [at] = Math.round(y [at] * 100.0)/ 100.0;                      y [at + 1] = 1- y [at];                      y [at + 1] = Math.round(y [at + 1] * 100.0)/ 100.0;
                 }                  其他                  {                      y [at + 1] / = counter;                      y [at + 1] = Math.round(y [at + 1] * 100.0)/ 100.0;                      y [at] = 1- y [at + 1];                      y [at] = Math.round(y [at] * 100.0)/ 100.0;

             }
         }

         String output = "";
         for (int i=0; i<size; i+=2)
         {
            output += x[i] +" <- "+ y[i] +"  "+ x[i+1] +" -> "+ y[i+1] + "\n";
         }
         JOptionPane.showMessageDialog(null, output);   
     }
  } 

} }

所以它似乎没有贯穿所有结果,或者它没有计算它们但是我找不到原因

0 个答案:

没有答案