Write a program to display odd numbers less than 30
Answers
Answered by
1
Program in Java :-
public class OddNum {
public static void main(String [] args) {
for (int i = 1; I < 30; i++) {
if (i % 2 != 0) {
System.out.print(i + " ");
}
}
}
}
Similar questions