Take N (number of rows), print the following pattern of fibonacci series ,can you tell me what is the logic

Take N (number of rows), print the following pattern (for N = 4)
0
1 1
2 3 5
8 13 21 34
can you tell me the logic

you have to make two new variable for printing Fibonacci numbers

int Fibonacci series
i th value is sum of previous two values

series is 0 1 1 2 3 5 8 13 21 34 …

see the reference code

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.