Half Pyramid Pattern Program in Java Language

 class Test{

    public static void main(String args[])
    {
        int n=4;
        int m=5;
        for(int i=n; i>=1; i--){
            for(int j=1; j<=i; j++){
                System.out.print("*");
            }
            System.out.println();
        }
    }
}

OUTPUT:
**** *** ** *


Comments

Popular posts from this blog

Write A C Program To Delete A Single Element From An Array

Evolution of Computer Devices