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. public class Main
  10. {
  11. public static void main(String[] args) {
  12. System.out.println("Hello World");
  13. int n=-4;
  14.  
  15. if(n%2==0 || n<0){
  16. return ;
  17. }
  18.  
  19. for(int i=0;i<n-n/2;i++){
  20.  
  21. for(int j=0;j<n+3;j++){
  22. if (i==0 &&j<n+2) {
  23. System.out.print("*");
  24. }
  25. else if(j==n+2){
  26. System.out.print("e");
  27. }
  28. else{
  29. System.out.print(" ");
  30. }
  31.  
  32. }
  33.  
  34. System.out.println();
  35.  
  36. }
  37.  
  38.  
  39.  
  40. for(int i=0;i<n-n/2;i++){
  41. for(int j=0;j<n+3;j++){
  42. if (j<2 ) {
  43. System.out.print(" ");
  44. }
  45. else if((i==0&&j<n+2)){
  46. System.out.print("*");
  47. }
  48. else if(j==n+2){
  49. System.out.print("e");
  50. }
  51. else{
  52. System.out.print(" ");
  53. }
  54.  
  55.  
  56. }
  57. System.out.println();
  58. }
  59.  
  60.  
  61.  
  62. for(int i=0;i<1;i++){
  63. for(int j=0;j<=2*n+1;j++){
  64.  
  65.  
  66. if(j<n+2){
  67. System.out.print(" ");
  68. }
  69. else if(j==n+2){
  70. System.out.print("e");
  71. }
  72. else if(j>n+2){
  73. System.out.print("*");
  74. }
  75.  
  76.  
  77.  
  78. }
  79. System.out.println();
  80. }
  81.  
  82.  
  83. }
  84. }
  85.  
Success #stdin #stdout 0.1s 54588KB
stdin
Standard input is empty
stdout
Hello World