Solution:
Finding odd numbers between a range is not something out of the world! All you just need to run an iteration over the range and pick up the odd numbers once you get. That's it!
public class OddNumbers{
public static void main(String args[]){
System.out.println("The Odd Numbers Between 0-50's are:");
for (int n = 1; n <= 50; n++){
if (n % 2 != 0){
System.out.print(n + " ");
}
}
}
}
Run the program. It should print all the odd numbers in that range. Thanks.