fork download
  1. /******************************************************************************
  2.  
  3. Welcome to GDB Online.
  4. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
  5. C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
  6. Code, Compile, Run and Debug online from anywhere in world.
  7.  
  8. *******************************************************************************/
  9. import java.util.Scanner;
  10. public class Main
  11. {
  12. public static void main(String[] args) {
  13. Scanner sc=new Scanner(System.in);
  14. System.out.print("enter no.");
  15. int n= sc.nextInt();
  16. for(int i=1;i<=n;i++){
  17. for(int j=1;j<=n+1;j++){
  18. System.out.print("");
  19. System.out.print("e");
  20. System.out.println();
  21. }
  22. }
  23. for(int i=1;i<=n-1;i++)
  24. {for(int j=1;j<(n+3)-2*i;j++){
  25. System.out.print("*");
  26.  
  27. }
  28. for(int k=1;k<i;k++){
  29. System.out.print("");
  30. }
  31. System.out.print("e");
  32. System.out.println();
  33.  
  34. }
  35. }
  36.  
  37. }
  38.  
  39.  
  40.  
Success #stdin #stdout 0.17s 56564KB
stdin
5
stdout
enter no.e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
e
*****e
***e
*e
e