Example: Rectangle of 10 x 10 Stars

Print in the console a rectangle of 10 x 10 stars.

Input Output
(none) **********
**********
**********
**********
**********
**********
**********
**********
**********
**********

Hints and Guidelines

How does the example work? We initialize a loop with a variable i = 1, which increases with each iteration of the loop, while it is less or equal to 10. This way the code in the body of the loop is executed 10 times. In the body of the loop we print a new line in the console new string('*', 10), which creates a string of 10 stars.

Testing in the Judge System

Test your solution here: https://judge.softuni.bg/Contests/Practice/Index/512#0.

results matching ""

    No results matching ""