Square Display

I am trying to make a program that ask the user for a positive integer no greater than 15. The program should display a square on the screen using the character 'X'.. the number entered the the user will be the length of each side of the square, for example, if the user enter 5 the program should display the following.

XXXXX
XXXXX
XXXXX
XXXXX
XXXXX

if the user enter 8, the program should display the following

XXXXXXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX

i am trying to make this in C++ have no clue how to start it any help will be great.
Do you know how to use a loop to display n number of X's? And can you make a loop to display n number of lines? Well, you can combine those to have a loop creating n lines of a loop creating n X's.
Topic archived. No new replies allowed.