Guest User

Untitled

a guest
Sep 11th, 2019
58
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. public class set_up_test1
  3. {
  4. public static void main(String[] args)
  5. {
  6. int size = 4;
  7. for (int i=0;i<size;i++)
  8. {
  9. for (int j=0;j<i;j++)
  10. System.out.print("*");
  11. System.out.println();
  12. }
  13. for (int i=0;i<size;i++)
  14. {
  15. for (int j=0;j<i;j++)
  16. System.out.print(" ");
  17. for (int j=i;j<size;j++)
  18. System.out.print("*");
  19. System.out.println();
  20. }
  21.  
  22. }
  23. public static void part1 ()
  24. {
  25. int size = 5;
  26.  
  27. for (int i=0; i<size;i++)
  28. {
  29. for (int j=0;j<i;j++)
  30. System.out.print("*");
  31. System.out.println();
  32. }
  33. for (int i=0;i<size;i++)
  34. {
  35. for (int j=0;j<i;j++)
  36. System.out.print(" ");
  37. for (int j=i;j<size;j++)
  38. System.out.print("*");
  39. System.out.println();
  40. }
  41. }
  42. }
RAW Paste Data