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