I'd like to write a script that will read in an odd number to specify the number of rows of a diamond. If the user enters 5 the diamond will look like so:
*
***
*****
***
*
I know I will need nested for structures and output statements that print a single asterik, a single space or a single newline character, but I can't figure out the code.
The code for the initial prompt I understand.
Any help would be appreciated.
*
***
*****
***
*
I know I will need nested for structures and output statements that print a single asterik, a single space or a single newline character, but I can't figure out the code.
The code for the initial prompt I understand.
Any help would be appreciated.