This is about : C# Program to Print Triangle in Square
And this article : C# Program to Print Triangle in Square
Article Csharp, Article programs,
C# Program to Print Triangle in Square
C# Program to Print Triangle in Square
Program Statement:
Program Statement:
Write a program which display the following output on the screen.
####$####
###$#$###
##$###$##
#$#####$#
$#######$
Solution:
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");
}
}
}
Articles C# Program to Print Triangle in Square finished we discussed
A few of our information about the C# Program to Print Triangle in Square , I hope you can exploit carefully
No've You've finished reading an article on C# Program to Print Triangle in Square and many articles about modern home in our blog this, please read it. and url link of this article is https://liveeconcerts.blogspot.com/2013/12/c-program-to-print-triangle-in-square.html Hopefully discussion articles on provide more knowledge about the world of tech gadgets.
Tag : Csharp, programs,
https://publiclab.org/profile/cn22
ReplyDeletehttps://worldcosplay.net/member/720568
http://www.bakespace.com/members/profile/cn22/714979/
https://en.gravatar.com/cn225
http://www.cruzroja.es/creforumvolint_en/user/profile/21902.page