Read in your tongue here..

Wednesday, April 16, 2014

Lucas Series in Java

class Lucas{
public static void main(String args[])
{
   int n=Integer.parseInt(args[0]),num=1,i;//Input from command line
   for(i=0;i<n;i++)
   {
         num+=i;
         System.out.print(num+" ");
   }
}
}

No comments:

Post a Comment