Advertisement
Guest User

Untitled

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