Example: Square Made of Stars

Print on the console a square made of N x N stars (use a space between the stars, staying on the same line):

Input Output Input Output Input Output
2 * *
* *
3 * * *
* * *
* * *
4 * * * *
* * * *
* * * *
* * * *

Hints and Guidelines

The problem is similar to the last one. The difference here is that we need to figure out how to add a whitespace after the stars so that there aren't any excess white spaces in the beginning or the end.

Testing in the Judge System

Test your solution here: https://judge.softuni.org/Contests/Practice/Index/512#2.

results matching ""

    No results matching ""