Example: Rectangle Made of N x N Stars

Write a program that gets a positive integer n and prints on the console a rectangle made out of N x N stars.

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

Video: Rectangle of N x N Stars

Watch this video lesson to learn how to print a rectangle of 10 x 10 stars on the console using nested for-loops: https://youtu.be/9sB4Z2TI1AE.

Hints and Guidelines

Testing in the Judge System

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

results matching ""

    No results matching ""