Write a program in java to print odd numbers from 500 to 100 using while loop
Answers
Answered by
2
Answer:
public class odd
{
public static void main (String args[])
{
int i=500;
while(i>=100)
{
if(i%2!=0)
System.out.println(i);
i--;
}
}
}
Answered by
1
Hope it helps you................
Attachments:
Similar questions