Techno News, Nexus Lollipop Upgrade, WiFi Adapter, Transfer Photos from LG from Phone, Samsung Galaxy, Stock Firmwares, Huawei Android, Linux

Sabtu, 28 Desember 2013

C# Program to Print Triangle in Square

C# Program to Print Triangle in Square - very many people who love gadgets, especially gadgets nowadays with all sophisticated spek good, but not all gadgets suitable for your purposes, in blogs Techno News we will review and display speck with price gadgets from various brands and news about gadgets latest, now we will discuss first about C# Program to Print Triangle in Square please in see until finished because the news that we convey we try to complete 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 information C# Program to Print Triangle in Square

hopefully information about C# Program to Print Triangle in Square that we provide can be useful for you in determining the appropriate gadgets with your needs.

you just read the article with title C# Program to Print Triangle in Square if you intend to bookmark or share it please use link https://nikephang.blogspot.com/2013/12/c-program-to-print-triangle-in-square.html if you need other information about software or other hardware please visit other page in this blog.

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

Related : C# Program to Print Triangle in Square

0 komentar:

Posting Komentar