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 has been discussed
A few of our information about the C# Program to Print different Shapes | Triangle | half triangle, hopefully give more knowledge for you
You have finished reading
C# Program to Print different Shapes | Triangle | half triangle and many articles about Techno News in our blog this, please read it. and url link of this article is
https://ikkemunandar.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 Techno News.
Tag :
Csharp,
programs,
0 komentar:
Posting Komentar