How to make a Pyramid in Java with Star
In this program, you'll learn to create and print pyramid pattern with star and Floyd's triangle sing control statements in Java.
Sample Input
Enter how row of star do you want : 4
Sample Output
* *** ***** *******
You can find many pattern printing exercises in Java programming. You can further refine this program to print any other character instead of " * " or you can ask the user to enter number or rows. You can even modify this program to print pyramid of numbers. Such as:
1 121 12321 1234321
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login .