As part of an exercise we have been asked to create a triangle based on a user input and I'm quiet confused on where I'm going wrong
Would anyone be able to point me in the right direction as to where I'm going wrong?
Below is the brief;
This is the code I've gotten so far;
Any help would be greatly appreciated
Would anyone be able to point me in the right direction as to where I'm going wrong? Below is the brief;
Exercise 5.3
Ask the user for the triangle size they wish to display. Display a triangle created out
of asterisks based on the size entered.
For example, for a request of 6 the triangle should be:
*
**
***
****
*****
******
This is the code I've gotten so far;
namespace Exercise_5_3
{
class Program
{
static void Main(string[] args)
{
int column, row, size;
string inputSize;
Console.WriteLine("Please enter the size of the triangle you wish to create");
inputSize = Console.ReadLine();
size = int.Parse(inputSize);
for (row = size; row < size; row--)
{
for (column = size; column < row - 1; column++)
{
Console.WriteLine("*");
}
}
Console.WriteLine("Triangle completed!");
Console.ReadLine();
}
}
}
Any help would be greatly appreciated
