这个题目的要求是输入两个正整数,求出他们之间的素数,我编译通过了,可就是结果出不来,why?

解决方案 »

  1.   

    我试过,算法没有问题.
    你有用HTML试过吗?
    // in paint(..)
     for(int j=0;j<s.length;j++ )==>
     for(int j=0;j<p;j++ )void computer() {
       p= 0;
       for(int i=a+1;i<b;i++)
       {
          boolean judge=true;
          for(int j=2;j <= i/2 && judge;j++)
             judge = i%j!=0;      if(judge)
             s[p++] = i;
       }
    }
      

  2.   

    a = Integer.parseInt(input1.getText());
    b = Integer.parseInt(input1.getText());看清楚了!!!全是input1???晕倒!!!
      

  3.   

    谢谢各位了,尤其是:helpall() 和 YuLimin.
    加分.
      

  4.   

    不客户,大家都爱CSDN嘛;)))