fork download
  1. // adhira cs1a hw
  2. /*******************************************************************************
  3. *
  4. *print out triangle pattern
  5. *_______________________________________________________________________________
  6. *
  7. *
  8. *_____________________________________________________________________________
  9. *INPUT
  10. * no input
  11. *OUTPUT
  12. * *
  13. * ***
  14. * *****
  15. * *******
  16. *
  17. *******************************************************************************/
  18.  
  19. //produce triangle pattern
  20. #include <iostream>
  21. using namespace std;
  22.  
  23. int main ()
  24. {
  25. cout <<" *\n"<< " ***\n" << " *****\n " << "*******\n";
  26. return 0;
  27. }
  28.  
  29.  
Success #stdin #stdout 0.01s 5308KB
stdin
Standard input is empty
stdout
    *
   ***
  *****
 *******