Interview exercise for Linio
GPL-3.0 License
Interview exercise for Linio
Write a program that prints all the numbers from 1 to 100. However, for multiples of 3, instead of the number, print "Linio". For multiples of 5 print "IT". For numbers which are multiples of both 3 and 5, print "Linianos".
But here's the catch: you can use only one if
. No multiple branches, ternary
operators or else
.
else
, else if
or ternary