a1439775520

public class 求质数 {
public static void main(String[] args) {
	 for (int i = 2; i < 100; i++)
     {
         int temp = 0;
         for (int j = 2; j < i; j++)
         {
             if (i % j == 0)
             {
                 temp = 1;
             }
         }
         if (temp != 1)
         {
             System.out.println(i);
         }
     }
}

}

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2022-02-09
  • 2021-11-17
猜你喜欢
  • 2021-11-17
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
相关资源
相似解决方案