fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. /* Name of the class has to be "Main" only if the class is public. */
  7. class Ideone
  8. {
  9. public static void horizon(int x){
  10. int i;
  11. for(i=0;i<x;i++){
  12. System.out.print("#");
  13. }
  14. System.out.println();
  15. }
  16. public static void square(int x){
  17. int i;
  18. for(i=0;i<x;i++){
  19. horizon(x);
  20. }
  21. }
  22. public static void enix(int x){
  23. int i;
  24. for(i=0;i<=x;i++){
  25. square(i);
  26. }
  27. }
  28. public static void main (String[] args) throws java.lang.Exception
  29. {
  30. enix(4);
  31. }
  32. }
Success #stdin #stdout 0.07s 16532KB
stdin
Standard input is empty
stdout
#
##
##
###
###
###
####
####
####
####