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. // your code goes here
  13. int n;
  14. Scanner sc = new Scanner(System.in);
  15. n = sc.nextInt();
  16. System.out.println("Please Select A value");
  17.  
  18. for(int i=1;i<=n;i++)
  19. {
  20.  
  21. for(int j=1;j<=n;j++)
  22. {
  23. if( j<=1 || i==n )
  24. {
  25. System.out.print("e");
  26. }
  27. else
  28. {
  29. System.out.print(" ");
  30. }
  31.  
  32. }
  33.  
  34.  
  35. for(int j=1;j<=n;j++)
  36. {
  37. if(i==n)
  38. {
  39.  
  40. for( int k=1;k<=n;k++)
  41. {
  42. if(k==1)
  43. {
  44. System.out.print("*");
  45.  
  46. }
  47.  
  48. }
  49.  
  50. }
  51. else
  52. System.out.print(" ");
  53.  
  54. }
  55.  
  56.  
  57.  
  58. System.out.println("");
  59.  
  60. }
  61.  
  62. for(int i=1;i<=n;i++)
  63. {
  64. for(int j=1;j<=n;j++)
  65. {
  66. System.out.print(" ");
  67. }
  68.  
  69. for(int j=1;j<=n;j++)
  70. {
  71.  
  72. System.out.print("*");
  73.  
  74.  
  75. }
  76.  
  77.  
  78. System.out.println("");
  79. }
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93. }
  94. }
Success #stdin #stdout 0.11s 56496KB
stdin
5
stdout
Please Select A value
e         
e         
e         
e         
eeeee*****
     *****
     *****
     *****
     *****
     *****