Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create starPyramidPattern.java #171

Merged
merged 1 commit into from
Oct 15, 2023
Merged

Create starPyramidPattern.java #171

merged 1 commit into from
Oct 15, 2023

Conversation

Diptigit11
Copy link
Contributor

This Java code is designed to create a pyramid pattern made of stars. It uses two loops to achieve this: The outer loop, controlled by the variable i, runs from 1 to the desired height of the pyramid (specified by the value of n). The inner loop, controlled by the variable s, prints spaces before the stars. The number of spaces decreases as you move down the pyramid. For each row, it first prints spaces to create an indentation on the left side and then prints stars (asterisks) to form the pyramid. The number of stars increases with each row.

By adjusting the value of n, you can control the height of the pyramid. The program creates a visually pleasing pyramid pattern.

This Java code is designed to create a pyramid pattern made of stars. It uses two loops to achieve this:
The outer loop, controlled by the variable i, runs from 1 to the desired height of the pyramid (specified by the value of n).
The inner loop, controlled by the variable s, prints spaces before the stars. The number of spaces decreases as you move down the pyramid.
For each row, it first prints spaces to create an indentation on the left side and then prints stars (asterisks) to form the pyramid. The number of stars increases with each row.

By adjusting the value of n, you can control the height of the pyramid. The program creates a visually pleasing pyramid pattern.
@Diptigit11
Copy link
Contributor Author

#58 Please review my code and merge it under the Hacktoberfest-accepted label.Thank You

@sujana-kamasany sujana-kamasany added good first issue Good for newcomers Java Basic Java Programs Hacktoberfest-Accepted Make your Pull Request for Hacktoberfest 2023 labels Oct 15, 2023
@sujana-kamasany sujana-kamasany merged commit a864741 into sujana-kamasany:main Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Hacktoberfest-Accepted Make your Pull Request for Hacktoberfest 2023 Java Basic Java Programs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants