Java
public class Main {
public static void main(String[] args) {
for (int i = 1; i <= 100; i += 2) {
System.out.print(i + " ");
}
}
}Output
1 3 5 ... 99
We start from 1 and increment by 2 to hit only odd numbers.