18 lines
374 B
Java
18 lines
374 B
Java
|
class OddNumbers
|
||
|
{
|
||
|
public static void main(String args[])
|
||
|
{
|
||
|
int a,i;
|
||
|
|
||
|
System.out.println("Odd Numbers List from 1 to 100.");
|
||
|
|
||
|
for(i=1;i<=100;i++)
|
||
|
{
|
||
|
a = i;
|
||
|
if(i%2 != 0){
|
||
|
System.out.println(+a);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|