C# Program to Print different Shapes | Triangle | half triangle

C# Program to Print different Shapes

Program Statement:
Write a program using for loop which prints the following output on the screen.
*
***
*****
*******
*********
***********

Solution:
 static void Main(string[] args)
{
for (int i = 0; i <= 10; i=i+2)
{
for (int j = 0; j <= i; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.ReadLine();
}


Komentar

Postingan populer dari blog ini

All India BSNL Nodal officer Contact Information..!!!

Video & Photo Gallery: Unboxing ORICO D10000 Scharge Polymer Power Bank

How to Automatically Shrink url of ADF.ly || Earn Money By ADF.ly