print on console if else if statement is true