4
Reply

nested for structures

ahmed sami

ahmed sami

Nov 2 2012 3:28 PM
1.3k
 Write a program that prints the following diamond shape. You may use output statements that print a single asterisk (*), a single space or a single newline character. Maximize your use of repetition (with nested for structures) and minimize the number of output statements. 
      *
    *** 
  ***** 
 *******
********* 
 *******
  *****
   *** 
     *


Answers (4)