fork(1) download
  1. /******************************************************************************
  2.  
  3. Welcome to GDB Online.
  4. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
  5. C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
  6. Code, Compile, Run and Debug online from anywhere in world.
  7.  
  8. *******************************************************************************/
  9. #include <iostream>
  10. using namespace std;
  11. int main()
  12. {
  13.  
  14. int n; cin>>n;
  15.  
  16. for(int i=0; i<n+2; i++){
  17. for(int j=0; j<n+2; j++){
  18. if(j==n/2+1){cout<<"e"<<endl; break;}
  19. else cout<<" ";
  20. }
  21.  
  22. }
  23.  
  24. for(int i=0; i<n/2;i++){
  25. for(int j=0; j<n+2; j++){
  26. cout<<"*";
  27. }
  28. cout<<endl;
  29. }
  30.  
  31.  
  32. for(int i=0; i<n+2; i++){
  33. cout<<"*";
  34. }
  35.  
  36. for(int i=0; i<n+2;i++){
  37. cout<<"e";
  38. }
  39. cout<<endl;
  40. for(int i=0; i<n/2; i++){
  41. for(int j=0; j<n+2; j++){
  42. cout<<"*";
  43. }
  44. cout<<endl;
  45. }
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. return 0;
  56. }
Success #stdin #stdout 0s 5320KB
stdin
11
stdout
      e
      e
      e
      e
      e
      e
      e
      e
      e
      e
      e
      e
      e
*************
*************
*************
*************
*************
*************eeeeeeeeeeeee
*************
*************
*************
*************
*************