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();
}
Information about the C# Program to Print different Shapes | Triangle | half triangle we have conveyed
A few of our information about the C# Program to Print different Shapes | Triangle | half triangle, I hope you can exploit carefully
You have finished reading
C# Program to Print different Shapes | Triangle | half triangle and many articles about Tech News in our blog this, please read it. and url link of this article is
https://hibbydabby.blogspot.com/2013/12/c-program-to-print-different-shapes.html Hopefully discussion articles on
provide more knowledge about the world of new tech gadgets and tech news.
Tag :
Csharp,
programs,
0 komentar:
Post a Comment