Fun Gadget World, Samsung Tool PRO, Android Multi Tools, Android Jelly Bean, stock firmware, AT&T Connect, Ulefone Tiger, techno n8 and Octopus Box LG Setup

C# Program to Print Triangle in Square

C# Program to Print Triangle in Square - a lot of websites that discuss information about gadgets, including this blog Fun Gadget World we discuss all the information from various brands of gadgets, from the old to the latest, which is very dear if you miss, now we discuss first about C# Program to Print Triangle in Square we have collect lots of data to create this article so that you get complete information, so please read it:

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




information C# Program to Print Triangle in Square has been completed in the discussion

hopefully the information C# Program to Print Triangle in Square can be useful for you in looking for references about technology gadgets,

you just finished reading information about C# Program to Print Triangle in Square if you want to bookmark or share this link please use link https://indiafunworld.blogspot.com/2013/12/c-program-to-print-triangle-in-square.html please also visit to other page to get more information.

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

Related : C# Program to Print Triangle in Square

0 komentar:

Posting Komentar