Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1.  
  2. public class FinalExam {
  3.  
  4.  
  5.  
  6. public static void main(String[] args) {
  7.  
  8. //at any given row, our num_asteriks MUST equal num_row
  9. //i.e row 1 = 1 asterisk
  10.  
  11.  
  12. //declaration and initialization
  13. //condition
  14. //incrementor
  15. for (int row = 1; row < 10; row++){
  16.  
  17. System.out.println("");
  18.  
  19. //num_asteriks
  20. for (int col = 0; col < row; col++){
  21.  
  22. System.out.print("*");
  23.  
  24. }
  25.  
  26. }
  27.  
  28. }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement