I have a program due soon and this is the prompt:
Write a program that will require the user to enter an ODD integer between 0 and 20. The program will
then output to a file a square made of characters that has the same height and width as the odd number
entered at the console.
The characters that form the outside of the square will be ‘2’. The single
character that is located in the very center of the square will be ‘*’. All the rest of the interior characters
of the square will be ‘0‘ (character zeros).
For example if the user enters the odd number 7 the file output would look like the figure below.
The print characters should be implemented as named constants. The user should continue to be prompted until an odd number in the correct range has been entered. The creation of the output file should be verified.
I think I can use an array to do this. But I do not know the outline of how it should look. Thanks