C Workshop
Diamond.c File Reference
#include "Diamond.h"
#include <stdio.h>

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