Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class FinalExam {
- public static void main(String[] args) {
- //at any given row, our num_asteriks MUST equal num_row
- //i.e row 1 = 1 asterisk
- //declaration and initialization
- //condition
- //incrementor
- for (int row = 1; row < 10; row++){
- System.out.println("");
- //num_asteriks
- for (int col = 0; col < row; col++){
- System.out.print("*");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement