fork download
  1. // Eric Bernal Chapter 2, P. 83 #15 CS1A
  2. /******************************************************************************
  3.  * CREATING A TRIANGLE
  4.  * _____________________________________________________________________________
  5.  This program will create a triangle in text
  6. *_______________________________________________________________________________
  7. INPUT:
  8. * = Constant
  9.  
  10. Output:
  11. Triangle
  12. *******************************************************************************/
  13.  
  14. #include <iostream>
  15. using namespace std;
  16.  
  17. int main() {
  18. cout << " * " << endl;
  19. cout << " *** " << endl;
  20. cout << " ***** " << endl;
  21. cout << "*******" << endl;
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 5272KB
stdin
Standard input is empty
stdout
   *   
  ***  
 ***** 
*******