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.  
  14. int i, j, n;
  15.  
  16. n =-3;
  17.  
  18. if(n<0 || n==1){
  19. System.out.print("Blank");
  20. }
  21. if(n%2==0 ){
  22. System.out.print("Blank");
  23. }
  24.  
  25. for(i=0; i<n/2-1; i++){
  26. for(j=0; j<n+2; j++){
  27. if(j==0 || i==0){
  28. System.out.print("e");
  29. }
  30. else
  31. System.out.print(" ");
  32. }
  33.  
  34. }
  35. for(i=0; i<=n/2+1; i++){
  36. for(j=0; j<=(n/2+1)-i; j++) {
  37. System.out.print(" ");
  38. }
  39. for(j=0; j<2*i-1; j++) {
  40. System.out.print("*");
  41. }
  42. System.out.println();
  43. }
  44. }
  45. }
Success #stdin #stdout 0.09s 54692KB
stdin
Standard input is empty
stdout
Blank