Snippets Collections
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace StarPattern
{
class Program
{
static void Main(string[] args)
{
int x, y, z;
for (x =6; x >= 1; x--)
{
for (y = 1; y < x; y++)
{
Console.Write(" ");
}
for (z = 6; z >= x; z--)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.ReadLine();
}
}
}
star

Thu Nov 12 2020 22:03:53 GMT+0000 (UTC) https://www.educba.com/patterns-in-c-sharp/

#c# #loops #for

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension