import java.util.*;
import java.lang.*;
import java.io.*;
// The main method must be in a class named "Main".
class Main {
public static void main(String[] args) {
System.out.println("even , odd");
for (int i=0; i<20;i++)
{
if (i%2!=0)
{
System.out.println(i);
}
else if (i%2==0){
System.out.print(" ");
System.out.print(i+" , ");
}
}
// System.out.print("\nthese are odd numbers\n");
// for (int i=0; i<20;i++)
// {
// if (i%2==0)
// {
// System.out.print(i+",");
// }
// }
// System.out.print("\nthese are even numbers");
}}
To embed this program on your website, copy the following code and paste it into your website's HTML: