Techno Aspirations, Apple iPhone, SAMSUNG, Motorola Moto, Secret Codes, price, specifications, Samsung Galaxy, Clone Huawei, Flash File, Google LG Nexus

C# Program to Print Triangle in Square

C# Program to Print Triangle in Square - hello friends are you looking for information related to technology? ... if yes ... then you are right to come to blog Techno Aspirations because here we will display information about the latest gadgets or old ones though, well now we will discuss first about C# Program to Print Triangle in Square as you are looking for, hopefully the information we will convey can answer your question to google, 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");
}
}
}




just so much information about C# Program to Print Triangle in Square

hopefully the information we provide about C# Program to Print Triangle in Square can give answer your question to google, and you feel satisfied about this.

you just finished reading the article with the title C# Program to Print Triangle in Square if you feel this information need to bookmark or share please use link https://faultyaspirations.blogspot.com/2013/12/c-program-to-print-triangle-in-square.html do not forget there are many other information in this blog, please visit other page.

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

Related : C# Program to Print Triangle in Square

0 komentar:

Posting Komentar