Go to the source code of this file.
|
int | PrintDiamond (int diamondSize) |
| Creates a diamond shape made of asterisk characters using a parameter for the number of asterisks in the base. More...
|
|
◆ PrintDiamond()
int PrintDiamond |
( |
int |
diamondSize | ) |
|
Creates a diamond shape made of asterisk characters using a parameter for the number of asterisks in the base.
- Note
- diamondSize must be a positive odd integer.
- Parameters
-
diamondSize | Number of asterisks in the base |
- Returns
- int Length of string if successful, negative number otherwise