fork download
  1. // Eric Bernal Chapter 2, P. 83 #16 CS1A
  2. /******************************************************************************
  3.  * CREATING A DIAMOND
  4.  * ____________________________________________________________________________
  5. This program creates a diamond pattern out of text.
  6. *______________________________________________________________________________
  7. INPUT
  8. * : Constant
  9.  
  10. OUTPUT
  11. Diamond
  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. cout << " ***** " << endl;
  23. cout << " *** " << endl;
  24. cout << " * " << endl;
  25.  
  26. return 0;
  27. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
     *     
    ***    
   *****   
 ********* 
   *****   
    ***    
     *