Infosys interview question

write a program for controlling a variable using IF condition