displaying ternary and printed output

displaying ternary and printed output