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 main (String[] args) throws java.lang.Exception
  11. {
  12. int n=5;
  13. for(int i=1;i<=n;i++)
  14. {
  15. System.out.print("*");
  16. }
  17. System.out.println();
  18. for(int i=1;i<=n;i++)
  19. {
  20. for(int j=1;j<=(n-4);j++)
  21. {
  22. System.out.print(" ");
  23. }
  24. for(int j=n;j>=(n-2);j--)
  25. {
  26. System.out.print("e");
  27. }
  28. System.out.println();
  29. }
  30. for(int i=1;i<(n-2);i++)
  31. {
  32. for(int j=1;j<=(i+1);j++)
  33. {
  34. System.out.print("s");
  35. }
  36. for(int k=n;k>=i;k--)
  37. {
  38. System.out.print("*");
  39. }
  40. System.out.println();
  41. }
  42.  
  43. }
  44. }
Success #stdin #stdout 0.08s 54672KB
stdin
Standard input is empty
stdout
*****
 eee
 eee
 eee
 eee
 eee
ss*****
sss****