IBM interview question

Java program to print alternate numbers