Problem: Triangle of 55 Stars
Write a C# console program that prints a triangle made of 55 stars on 10 lines:
*
**
***
****
*****
******
*******
********
*********
**********
Video: Problem "Triangle of 55 Stars"
Watch a video lesson to learn how to solve the "Triangle of 55 Stars" problem step by step: https://youtu.be/BflTRoOQYLA.
Hints and Guidelines
Create a new console C# application with name “TriangleOf55Stars
”. Inside it, write code that 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.org/Contests/Practice/Index/503#3.
Try to improve 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.