fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.util.Scanner;
  5. import java.lang.*;
  6. import java.io.*;
  7.  
  8. /* Name of the class has to be "Main" only if the class is public. */
  9. class Ideone
  10. {
  11. public static void main (String[] args) throws java.lang.Exception
  12. {
  13. // Scanner in = new Scanner();
  14.  
  15. // system.out.print("Please Enter the number here :");
  16.  
  17. // int n = in.nextInt(System.in);
  18.  
  19. int n = 3;
  20.  
  21. boolean state = true;
  22.  
  23. for(int i = 2 ; i < n ; i++){
  24. if(n%i == 0){
  25. state = false;
  26. }
  27. }
  28.  
  29. if(state == false){
  30. System.out.println("Number is even please enter the odd number only except 1");
  31. }
  32.  
  33. for(int i = 1 ; i <= n+2 ; i++){
  34.  
  35. for(int j = 1 ; j<= (n*2-1) ; j++){
  36. System.out.print(" ");
  37.  
  38. }
  39. System.out.print("e");
  40. System.out.println();
  41.  
  42. }
  43.  
  44. }
  45. }
Success #stdin #stdout 0.07s 52668KB
stdin
Standard input is empty
stdout
     e
     e
     e
     e
     e