fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int n=5;
  6. for(int i=0;i<n;i++)
  7. {
  8. for(int j=0;j<=n;j++)
  9. {
  10. if(i==0)
  11. {
  12. cout<<"*";
  13. }
  14. }
  15. }
  16. int mid=(n)/2;
  17. for(int i=0;i<n;i++)
  18. { cout<<endl;
  19. for(int j=0;j<=n;j++)
  20. {
  21. if(j==(mid+1)||j==(mid+2))
  22. {
  23. cout<<"e ";
  24. //cout<<mid;
  25. }
  26. else{
  27. cout<<" ";
  28. }
  29. }
  30.  
  31. }
  32. return 0;
  33. }
Success #stdin #stdout 0.01s 5324KB
stdin
Standard input is empty
stdout
******
   e e  
   e e  
   e e  
   e e  
   e e