Problem: a triangle of 55 stars

Write a C# console program, which prints a triangle of 55 stars on 10 rows:

*
**
***
****
*****
******
*******
********
*********
**********

Hints and Guidelines

We create a new console C# application with name “TriangleOf55Stars”. In it we have to write code, which prints the triangle of stars, for example through 10 commands, as the ones pointed out below:

Console.WriteLine("*");
Console.WriteLine("**");
…

Testing in the Judge System

Test your solution here: https://judge.softuni.bg/Contests/Practice/Index/503#3.

Try to better your solution, so that it doesn't have many repeating commands. Could it be done with a for loop? Did you find a smart solution (for example with a loop) of the previous task? With this task you can also use something similar, but a bit more complex (two loops, one inside the other). If you don't succeed, there is no problem, we will be learning loops in a few chapters and you will be reminded of this task then.

results matching ""

    No results matching ""