C Workshop
Diamond.h File Reference

Go to the source code of this file.

Functions

int PrintDiamond (int diamondSize)
 Creates a diamond shape made of asterisk characters using a parameter for the number of asterisks in the base. More...
 

Function Documentation

◆ 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
diamondSizeNumber of asterisks in the base
Returns
int Length of string if successful, negative number otherwise