Technology News, Micromax, Mobiles Flashing Software, Flash Tool, Pokemon GO Apk, Income Online, Moto G4 Plus, Sony PC, Latest Version, samsung note, Huawei Smartphone

Saturday, December 28, 2013

C# Program to Print Triangle in Square

C# Program to Print Triangle in Square - technology is getting more advanced every day .. if you want to know the progress that happened please visit this blog Technology News because it will always update the latest information, now we will discuss first about C# Program to Print Triangle in Square hopefully this information can answer the questions you submit to google, ok 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");
}
}
}




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

hopefully information C# Program to Print Triangle in Square can benefit you in getting the latest information about technology,

you just read the article entitled C# Program to Print Triangle in Square if the article feel useful for you please bookmark or share by using link https://micromyaw.blogspot.com/2013/12/c-program-to-print-triangle-in-square.html and thank you.

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

Related : C# Program to Print Triangle in Square

0 comments:

Post a Comment