fork(1) download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. for(int x = 1; x <= 7; ++x)
  6. {
  7. for(int y = 1; y <= x; ++y)
  8. {
  9. std::cout << " ";
  10. }
  11. for(int y = 1; y <= x; ++y)
  12. {
  13. std::cout << "*";
  14. }
  15. std::cout << std::endl;
  16. }
  17. }
  18.  
Success #stdin #stdout 0s 2884KB
stdin
Standard input is empty
stdout
 *
  **
   ***
    ****
     *****
      ******
       *******