Gadget blog, Android KitKat, stock firmware, Unboxing, Toggle Mod Major Crashing Bug Fixed, Android Jelly Bean, Studio Mobile, Apk + DATA, How To Set, Unlocker Photo In WhatsApp, Majestic Tab Firmware Flash File

C# Program to Print Triangle in Square

C# Program to Print Triangle in Square - welcome to the blog Gadget Blog we provide information about the latest gadgets, which we provide for you for a while, now we discuss about C# Program to Print Triangle in Square we have collected a lot of information about this article from many reliable sources, so 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 about C# Program to Print Triangle in Square

just so much information about C# Program to Print Triangle in Square , hopefully can provide benefits for you,

you just read the information about C# Program to Print Triangle in Square if this article feel useful for you please bookmark or share again with link https://everythingnbeyondblog.blogspot.com/2013/12/c-program-to-print-triangle-in-square.html thanks.

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

Related : C# Program to Print Triangle in Square

0 komentar:

Posting Komentar