If I define an array as arr[n*(n+1)/2], for numbers 5 and larger, the program either crashes or shows an error.
But if I take a variable p,store the value in it and define the array as arr[p], I don’t get any error.
Why is this so?
Also, in the fibonacci pattern, if I want to input 10 rows, why are there some numbers negative in 10th row?