hi, im having trouble with a java program. i need to know how to display only the odd numbers using a simple while loop.
the user has to enter a number greater than or equal to 1
for example, i prompt the user to enter a number.
if the number the user enters is '6' , i want to display 1, 3, and 5 (all the odds before i get to the value the user got in)
if the number the user enters is '13', i want to display 1, 3, 5, 7, 9, 11, and 13.
can anyone help me with this?