Republic Gadget, Windows Phone, Asansam box Version, Z3X BOX Samsung, How to Backup, iPhone 7 to PC/Mac, Korea Telecom

C# Program to Print Triangle in Square

C# Program to Print Triangle in Square - the world of technology is more advanced, we should be technically literate so as not left behind by others, in blogs Republic Gadget we will present updated information about technological developments, product reviews from various brands, now we will discuss first about this information C# Program to Print Triangle in Square we cover directly from reliable sources, please see:

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




so much information C# Program to Print Triangle in Square

hopefully the infromation that we show for you about C# Program to Print Triangle in Square can provide the latest knowledge about the gadgets you need in everyday life.

you've just read the article with the title C# Program to Print Triangle in Square if you intend to bookmark or share it for many people please use the link https://bhrepublicadominicana.blogspot.com/2013/12/c-program-to-print-triangle-in-square.html still a lot of information on this blog, please 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