Add output to ternary.c