Infosys Interview Question

write a program for controlling a variable using IF condition