fork download
  1.  
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main(){
  6. int n = 11;
  7. // cin>> "Enter your number:";
  8. // cin>>n;
  9.  
  10. if(n<3 || n%2==0){
  11. cout<<"please enter valid number";
  12. return 0;
  13. }
  14.  
  15. for(int i=0; i<n/2+1; i++){
  16. for(int j=0; j<n; j++){
  17. cout<<" ";
  18. if(j ==n-1){
  19. cout<<"e";
  20. }
  21. }
  22. for(int j=0; j<n+2; j++){
  23. if(i==0){
  24. cout<<"*";
  25. }
  26. }
  27. cout<<endl;
  28.  
  29. }
  30.  
  31.  
  32. for(int i=0; i<n/2+1; i++){
  33. for(int j=0; j<n; j++){
  34. cout<<" ";
  35. if(j ==n-1){
  36. cout<<"e";
  37. }
  38. }
  39. for(int j=0; j<n; j++){
  40. if(i==0){
  41. cout<<"*";
  42. }
  43. }
  44. cout<<endl;
  45.  
  46. }
  47.  
  48. for(int i=0; i<1; i++){
  49. for(int j=0; j<=i; j++){
  50. cout<<" ";
  51. }
  52. for(int j=0; j<n; j++){
  53. if(j==n-1){
  54. cout<<"e";
  55. }
  56. else{
  57. cout<<"*";
  58. }
  59.  
  60.  
  61. }
  62. }
  63. return 0;
  64. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
           e*************
           e
           e
           e
           e
           e
           e***********
           e
           e
           e
           e
           e
 **********e