There is a function that calls itself, that is, recursive. Suppose n = 5. It is necessary to calculate the sum of the elements that appear on the console (but this is just a word).
At first, everything seems to be clear. The sequence will be this 5 4 3 2 1 0. I can’t understand further, in the debug it looks like this - 0 does not fit the condition and naturally doesn’t fit into the body if, but when it reaches the last bracket, it goes in the opposite direction (i.e. the functions do not start from the beginning, but from the end) In the photo, the sequence of calls and somehow falls into if and n = 1. How does this happen? I can not understand
static public void F(int n) { Console.Write(n + " "); if (n > 0) { F(n - 1); F(n - 3); } } 