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