For the love of god i feel like im losing sanity on trying to get this to work properly
just from some context i figured a good way of learning how to work with for loops would be to create a little console app that would just print a triangle more specifically an isosceles triangle. This really shined how little i truely know not only about c# but problem solving too
Things ive tried
using System;
namespace Course
{
class Program
{
static void Main(string[] args)
{
for(int row = 0; row < 10; row++)
{
for(int space = 0; space < row; space++)
{
Console.Write(" ");
}
for (int symbol = 0; row > symbol; symbol++)
{
Console.Write("#");
}
Console.WriteLine();
}
}
}
}
is kinda how i end up rewriting the code most times
i feel lost looking at the code for hours and for once i feel helpless coming to a solution
using System;
namespace Course
{
class Program
{
static void Main(string[] args)
{
for(int row = 0; row < 10; row++)
{
for(int space = row / 2; space < row; space++)
{
Console.Write(" ");
}
for (int symbol = 0; row > symbol; symbol++)
{
Console.Write("#");
}
Console.WriteLine();
}
}
}
}
^^^
This time i know that the spaces will be about /2 of the triangle and will make it closer to the actaul things but no matter what i do it seems like the spaces always end up being 10 space at top with 10 symbols on top or 1 space at top with 1 symbol at top
any help is appriciated