Did you tried with input 0 or 1 ? correct the logic issue is in program to work for all the condition.
Did you tried with input 0 or 1 ? correct the logic issue is in program to work for all the condition.