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