@@ -0,0 +1,894 @@
+package fibonacci;%0A%0Apublic class FirstWithNDigits%0A%7B%0A  public static long firstWithNDigits(long n) throws IllegalArgumentException%0A  %7B%0A    if (n %3C= 0)%0A      throw new IllegalArgumentException(%22Must use a positive integer greater than 0%22);%0A%0A    long x = 0,%0A         result = 0,%0A         digits = 1;%0A%0A    while (digits %3C n)%0A    %7B%0A      result = Fibonacci.fibonacci(++x);%0A      digits = (long)Math.log10(result) + 1;%0A    %7D%0A%0A    return result;%0A  %7D%0A%0A  public static void main(String%5B%5D args)%0A  %7B%0A    if (args.length %3E 0)%0A    %7B%0A      try%0A      %7B%0A        long n = Long.parseLong(args%5B0%5D);%0A        System.out.printf(%22First with %25d digits: %25d%5Cn%22, n, firstWithNDigits(n));%0A      %7D%0A      catch (NumberFormatException e)%0A      %7B%0A        System.err.println(%22Arguments must be numbers!%22);%0A      %7D%0A      catch (IllegalArgumentException e)%0A      %7B%0A        System.err.println(e.getMessage());%0A      %7D%0A    %7D%0A  %7D%0A%7D%0A

Implement a program that returns the first number in the fibonacci sequence with given number of digits.