Test All Gadget, Z3X BOX Samsung, Miracle Box, Smart Phone Flash Tool, Stock ROMs, Android Tool, apps, Data Plans Internet

Sabtu, 28 Desember 2013

C# Program to Print Triangle in Square

C# Program to Print Triangle in Square - discussing about technology is my hobby, with media blogs Test All Gadget we can share the knowledge of technology that continues to grow with various ways of use that is intended to simplify your life, now we will discuss first about that in your search that is C# Program to Print Triangle in Square please refer to our explanation because we will try to make a complete article for you.

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




enough already articles C# Program to Print Triangle in Square

hopefully the information C# Program to Print Triangle in Square that we submit on this blog can be useful for your life and all the people who visit this blog.

you just finished reading the article with the title C# Program to Print Triangle in Square if you intend to bookmark or shre please use the link https://testallforone.blogspot.com/2013/12/c-program-to-print-triangle-in-square.html and do not visit other pages on this blog because it still sangant a lot of information about gadgets from the old to the latest.

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

Related : C# Program to Print Triangle in Square

4 komentar: