A OR B
CodeChefOpen on judge ↗
Mr.X has been asked to write a program by his computer teacher.The program should take 0 or 1 as the input and it should print the character 'a' if the input is 0 and it should print the charater 'b' if the input is 1.Ofcourse the program can be done using a simple if else statement but the teacher does not want Mr.X to use any of the conditional statements.However,the teacher has given Mr. X a hi
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start