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();
}
Articles about C# Program to Print different Shapes | Triangle | half triangle finished discussed
We think it is enough information about C# Program to Print different Shapes | Triangle | half triangle, hopefully the information we give can give benefit for you,
If you feel the information C# Program to Print different Shapes | Triangle | half triangle that we provide can provide benefits for others please share with link https://darellsfinancialcorner.blogspot.com/2013/12/c-program-to-print-different-shapes.html thank you for visiting our blog page and do not forget to visit other
0 komentar:
Posting Komentar