//PROGRAM TO PRINT EVEN AND ODD NUMBERS
class evenOdd
{
public static void main(String args[ ])
{
int i;
System.out.println(“Even and Odd numbers upto 10 are:”);
System.out.println(“Odd numbers are:”);
for(i=1;i<=10;i=i+2) //PRINTING ODD NUMBERS
{
System.out.println(+i);
}
System.out.println(“Even numbers are:”);
for(i=2;i<=10;i=i+2) //PRINTING EVEN NUMBERS
{
System.out.println(+i);
}
}
}