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