fork(1) download
  1. // Matthew Santos CS1A Ch. 2, P. 83, #15
  2. /**********************************************
  3.  *
  4.  * DISPLAY TRIANGLE
  5.  * ____________________________________________
  6.  *
  7.  * Displays a triangle on the screen.
  8.  * ____________________________________________
  9.  *
  10.  * INPUT
  11.  * instructions for triangle pattern
  12.  *
  13.  * OUTPUT
  14.  * triangle
  15.  *
  16.  * ********************************************/
  17.  
  18. #include <iostream>
  19. using namespace std;
  20.  
  21. int main() {
  22.  
  23. //Displays triangle
  24. cout << " * \n";
  25. cout << " *** \n";
  26. cout << " ***** \n";
  27. cout << "*******\n";
  28.  
  29. return 0;
  30. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
   *   
  ***  
 ***** 
*******