This is about : C# Program to Print Triangle in Square
And this article : C# Program to Print Triangle in Square
Article Csharp, Article programs,
C# Program to Print Triangle in Square
C# Program to Print Triangle in Square
Program Statement:
Program Statement:
Write a program which display the following output on the screen.
####$####
###$#$###
##$###$##
#$#####$#
$#######$
Solution:
Solution:
class shape
{
int x, y;
public void sh()
{
Console.WriteLine();
for (x = 1; x <= 5; x++)
{
for (y = 1; y <= 5 - x; y++)
{
Console.Write("#");
}
Console.Write("$");
for (y = 2; y <= x * 2 - 1; y++)
{
Console.Write("#");
}
Console.Write("\b$");
for (y = 1; y <= 5 - x; y++)
{
Console.Write("#");
}
Console.WriteLine("\n");
}
}
}
Information C# Program to Print Triangle in Square has been completed we present
A few of our information about the C# Program to Print Triangle in Square , we hope you benefit from this article
You have just read the article C# Program to Print Triangle in Square and many articles about gadget in our blog this, please read it. and url link of this article is https://howtomonetizeeverything.blogspot.com/2013/12/c-program-to-print-triangle-in-square.html Hopefully discussion articles on provide more knowledge about the world of tech gadgets.
Tag : Csharp, programs,
Can you write a review on this app please?
ReplyDelete