How to print star pattern in c#.
In this article, we will learn how to print star below pattern in c#
Sample Output
In this article, we will learn how to print star below pattern in c#
Sample Solution
C# Sharp Codeusing System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Print_12345 { class Program { static void Main(string[] args) { for (int i = 1; i <= 5; i++) { for (int j = 1; j <= i; j++) { Console.Write("*"); } Console.WriteLine(""); } Console.ReadLine(); } } }
Sample Output
hi
ReplyDelete