You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm late but you just have to replace this statement : @if $n >= 0
With this one: @if $n > 0
By doing that, when $i == 0 the loop looks like this : @for 1 from 0 to 0
This means that the loop stop right before 0... So the loop don't start and the function return 1
In math any number to the zero power is one, so
power(2, 0);
should return "1", but it returns return "4"
http://www.homeschoolmath.net/teaching/zero-exponent-proof.php
The text was updated successfully, but these errors were encountered: