Print Square pattern Java programming Code Basic

 import java.util.*;

//Print Square pattern

public class squarePattern {

    public static void main(String args[]) {

        // for (int lines = 1; lines <= 4; lines++)

        // System.out.println("****");


        int lines = 1;

        while (lines <= 4) {

            System.out.println("****");

            lines++;


        }


    }


}


import java.util.*;

//Print Square pattern
public class squarePattern {
    public static void main(String args[]) {
        // for (int lines = 1; lines <= 4; lines++)
        // System.out.println("****");

        int lines = 1;
        while (lines <= 4) {
            System.out.println("****");
            lines++;

        }

    }

}

No comments:

Post a Comment

Max Sub Array Sum: Kadane's Algorithm

Code of: Max Sub Array Sum: Kadane's Algorithm. public class MaxSubArraySumKadanesALgorithm {     public static void Kadane ( int ...