fork download
  1. #include<bits/stdc++.h>;
  2. using namespace std;
  3. int main()
  4. {
  5. int n=5,j,k;
  6. bool o=false,t=false;
  7. for(int i=((2*n) - 1); i >= -((2*n)-1); i -=2)
  8. {
  9. if (i == 1) continue;
  10. for(j=10-abs(i); j >0;j-=2)
  11. {
  12. cout << " ";
  13. }
  14. for(k=abs(i);k>0;k--)
  15. {
  16. cout << "*";
  17. }
  18. cout << endl;
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
 *********
  *******
   *****
    ***
     *
    ***
   *****
  *******
 *********