Test case 2 not pass =run error!

import java.util.*;
public class Main {
static void fib(int f[], int N)
{

            f[1] = 0;
            f[2] = 1;

            for (int i = 3; i <= N; i++)


                f[i] = f[i - 1] + f[i - 2];
        }

        static void fiboTri(int n)
        {

            int N = n * (n + 1) / 2;
            int f[] = new int[N + 1];
            fib(f, N);


            int fiboNum = 1;

            for (int i = 1; i <= n; i++) {

                for (int j = 1; j <= i; j++)
                    System.out.print(f[fiboNum++] + "\t");

                System.out.println();
            }
        }

        public static void main(String[] args)
        {
           Scanner sc = new Scanner(System.in);

              int n = sc.nextInt();
           if(0<=n && n<= 100){
            fiboTri(n);}
        }
    }

hey @himanshusingh2389_63aac7fac0c69386 Can you tell me the problem which you are facing.So I will give you the solution accordingly.

@himanshusingh2389_63aac7fac0c69386 You are getting run error for n = 1
try it and debug it.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.