Advertisement
desislava_topuzakova

task4

Jan 10th, 2018
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. public class Problem4_Triangleof55stars
  2. {
  3. public static void main(String[] args)
  4.  
  5.  
  6. { //начин 1
  7. //System.out.println("*");
  8. //System.out.println("**");
  9. //System.out.println("***");
  10. //System.out.println("****");
  11. //System.out.println("*****");
  12. //System.out.println("******");
  13. //System.out.println("*******");
  14. // System.out.println("********");
  15. //System.out.println("*********");
  16. // System.out.println("**********");
  17.  
  18. //начин 2
  19. int count = 10;
  20. int l = 1;
  21. while(l <= count)
  22. {
  23. for(int x = 1; x <= l; x++)
  24. {
  25. System.out.print("*");
  26. }
  27. System.out.print("\n");
  28. l++;
  29. }
  30. }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement