import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {

    // sample4
    public static void main(String[] args) {
        int i = 0;
        while(i <= 5){
            System.out.print(i+" ");
            i++;
        }
        System.out.println();
    
    int j = 0;
    do{
        System.out.print(j+" ");
        j++;
    }while(j <= 5);
    System.out.println();
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: