A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Baklava in Java page! Here, you'll find the source code for this program as well as a description of how the program works.
public class Baklava {
public static void up() {
for (int i = 0; i < 10; i++)
printRow(i);
}
public static void down() {
for (int i = 10; i >= 0; i--)
printRow(i);
}
public static void printRow(int rowNum) {
for (int j = 10 - rowNum; j > 0; j--)
System.out.print(" ");
for (int j = 0; j <= rowNum * 2; j++)
System.out.print("*");
System.out.println();
}
public static void main(String[] args) {
up();
down();
}
}
Baklava in Java was written by:
If you see anything you'd like to change or update, please consider contributing.
No 'How to Implement the Solution' section available. Please consider contributing.
No 'How to Run the Solution' section available. Please consider contributing.