How to use loops for this problem?

Hi, I'm a beginner. Can anyone help me to solve this problem? Thanks!

program reads an
integer value n and a character symbol. The program forms the letter Z by printing n input
character symbols on the upper line, n input character symbols on the lower line, and n input
character symbols on the diagonal line. If the value of n is less than or equal to 2, the program
prints “Cannot create the mark.”.
The input and printing process must be repeated until the user presses n, for stop.
Sample Input/Output:
Input a number and a symbol: 5 #
#####
#
#
#
#####
Do you want to continue? [y/n] : y
Input a number and a symbol: 12 *
************
*
*
*
*
*
*
*
*
*
*
************
Do you want to continue? [y/n] : n
Goodbye.
Last edited on
I have a feeling it's going to involve asking the user how big they want it, then asking what symbol to use, then printing that many symbols in a row, then using a loop within a loop to pad outputting the symbols with whitespace, then making another line of that many symbols, and then asking if they want to do it again.

What part do you need help on?
Can you please give me the codes for this one? And I will try another problems that prints another letter. Thanks again.
Topic archived. No new replies allowed.