📌  相关文章
📜  int num1=Integer.parseInt(args[0]); int num2=Integer.parseInt(args[1]); System.out.println(&quot;&quot;+num1+&quot;和&quot;+num2+&quot;之间的质数是:&quot;); for(i=num1; 我<num2; i++) - Whatever Code Example

📅  最后修改于: 2022-03-11 14:58:32.753000             🧑  作者: Mango

代码示例1
class Prime
{
  public static void main(String args[])
  {
     int i,j;
     if(args.length<2)
      {
           System.out.println("No command line Argruments ");
           return;
      }
 
      int num1=Integer.parseInt(args[0]);
      int num2=Integer.parseInt(args[1]);

      System.out.println("Prime number between"+num1+"and" +num2+" are:");
      for(i=num1;i<=num2;i++)
      {
           for(j=2;j