Advertisement
Varasku

Połówka choinki z lewej strony

Nov 15th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. package e9lul;
  2.  
  3.  
  4. public class E9lul {
  5.  
  6.  
  7. public static void main(String[] args) {
  8. //int szer=5, wysokosc=5;
  9. // for(int i=0;i<wysokosc;i++){
  10. // for(int k=0;k<szer;k++)
  11. // System.out.print("*");
  12. // System.out.println( );
  13. // }
  14. int wymiar=5;
  15. for(int j=0;j<wymiar;j++){
  16.  
  17. for(int i=0;i<wymiar;i++)
  18. if(i < wymiar - j - 1)
  19. System.out.print(" ");
  20. else
  21. System.out.print("*");
  22. System.out.println( );
  23. }
  24. System.out.println( );
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement