Can't tell why function is returning 0

Printable View