Implement a function void drawDiamonds (int count); that outputs a pattern of diamond shapes in descending sizes
Fantastic news! We've Found the answer you've been seeking!
Question:
Implement a function void drawDiamonds (int count); that outputs a pattern of diamond shapes in descending sizes from 2^(**) count rows to 2 rows, with correspondingly smaller sizes. To illustrate: below is the output when count is 4 . The only difference from your output is that I've put in underscores instead of spaces to show exactly where the spaces will be output.
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date: