fork download
  1. //Diego Martinez CSC5 Chapter 2, P. 83,#15
  2.  
  3. /*******************************************************************************
  4. * Printing Triangle Pattern
  5. * ______________________________________________________________________________
  6. * This program displays a Triangle-shaped star pattern.
  7. *
  8. * There is no formula to follow.
  9. *_______________________________________________________________________________
  10. * INPUT
  11. *
  12. * OUTPUT
  13. * This program prints a Triangle-shaped star pattern
  14. *******************************************************************************/
  15.  
  16. #include <iostream>
  17. using namespace std;
  18.  
  19. int main()
  20. {
  21. //Output
  22. cout << " *" << endl;
  23. cout << " ***" << endl;
  24. cout << " *****" << endl;
  25. cout << "*******" << endl;
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
   *
  ***
 *****
*******