C# Program to Print Triangle in Square

C# Program to Print Triangle in Square - welcome to our blog Techno Live, now we will discuss information about the C# Program to Print Triangle in Square , our admins on this blog has been around to collect information you are looking for so that we usakan to display complete information for you, and in this blog, you can also search for other information, ok please continue reading may be easily understood:

This is about : C# Program to Print Triangle in Square
And this article : C# Program to Print Triangle in Square
Article Csharp, Article programs,

You can also see our article on:


C# Program to Print Triangle in Square

C# Program to Print Triangle in Square

Program Statement:
Write a program which display the following output on the screen.
####$####
###$#$###
##$###$##
#$#####$#
$#######$

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");
}
}
}




Articles C# Program to Print Triangle in Square finished we discussed

A few of our information about the C# Program to Print Triangle in Square , I hope you can exploit carefully

No've You've finished reading an article on C# Program to Print Triangle in Square and many articles about modern home in our blog this, please read it. and url link of this article is https://liveeconcerts.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 : , ,

1 Response to "C# Program to Print Triangle in Square "