Full Pyramid using @ in java | Coding Startup

Full Pyramid using @ in java

Full Pyramid using @ in java.

100% Working Code and Projects.


if you need any help about project and Application Contact Shelly at:+917888361589.



Java Code Given Below:-

public class Pattern {

    public static void main(String[] Abheer) {
        int  k = 0;

        for(int i = 1; i <=5; ++i,k=0) {
            for(int space = 1; space <= 5 - i; ++space) {
                System.out.print("  ");
            }

            while(k != 2 * i - 1) {
                System.out.print("@ ");
                ++k;
            }

            System.out.println();
        }
    }
}




Output :-
                 @
             @ @ @
        @ @ @ @ @
    @ @ @ @ @ @ @
@ @ @ @ @ @ @ @ @


Code Startup

Author & Editor

0 Comments:

Post a Comment