Tecno Android Phones, Samsung Imei Repair, Huawei Mediapad, Official Firmware/ Flash File, WiFi, Alcatel One, Flash Tool Windows, Android Jelly Bean

C# Program to Print Triangle in Square

C# Program to Print Triangle in Square - we say welcome to the blog Tecno Android Phones we provide a lot of latest gadget information that must be very dear for you to miss, now we will discuss first about C# Program to Print Triangle in Square we have collected a lot of information to make this article to complete for you, Please read:

Articles : C# Program to Print Triangle in Square
full Link : 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 about C# Program to Print Triangle in Square finished discussed

We think it is enough information about C# Program to Print Triangle in Square , hopefully the information we give can give benefit for you,

If you feel the information C# Program to Print Triangle in Square that we provide can provide benefits for others please share with link https://southernmatron.blogspot.com/2013/12/c-program-to-print-triangle-in-square.html thank you for visiting our blog page and do not forget to visit other pages.

Tag : , ,
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : C# Program to Print Triangle in Square

0 komentar:

Post a Comment