fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n;
  7. cout<<"enter the value of n=";
  8. cin>>n;
  9. for(int i=0;i<n+2;i++){
  10. for(int j=0;j<((n+2)+(n/2));j++){
  11. cout<<" ";
  12.  
  13. }
  14. cout<<"e";
  15. cout<<endl;
  16. }
  17. for(int m=0;m<n+2;m++){
  18. for(int j=0;j<n+2;j++){
  19. if(m==2){
  20. cout<<"e";
  21. }
  22. else{
  23. cout<<" ";
  24. }
  25. }
  26.  
  27. }
  28. return 0;
  29. }
Success #stdin #stdout 0.01s 5324KB
stdin
3
stdout
enter the value of n=      e
      e
      e
      e
      e
          eeeee