Print triangle in reverse pattern - c# program, DOT NET Programming

Print Triangle in Reverse Pattern - C# Program

Need the code of C# Program for Print Triangle in Reverse Pattern.

Posted Date: 2/12/2013 12:35:02 AM | Location : United States





Use this following code i hope you will find the solution of your problem.

Program:

using System;  

class TriangleDollar

{

public static void Main()

{

int i,j,k;

string d="$";

for(i=1;i<=5;i++)

{

for(k=1;k<=i;k++)

Console.Write(" ");

for(j=5;j>=i;j--)

{

Console.Write ("$",+j); // Enter the space with a ''$'' sign 

// This is another syntax of Console.Write method. Here the digit after the comma '',''signifies the position of the first character ''$'' on the output screen.

}  

Console.Write("\n"); // then we go to the next line.

}

Console.ReadLine();

}

}

Posted by Alice | Posted Date: 2/12/2013 12:39:36 AM

Thanks for suggesting me this code, appreciate your effort.

Posted by james | Posted Date: 2/12/2013 12:40:38 AM


Related Discussions:- Print triangle in reverse pattern - c# program, Assignment Help, Ask Question on Print triangle in reverse pattern - c# program, Get Answer, Expert's Help, Print triangle in reverse pattern - c# program Discussions

Write discussion on Print triangle in reverse pattern - c# program
Your posts are moderated
Related Questions
What is Data Independence? Data independence means that "the application is independent of the storage structure and access method of data". In other words, the ability to cha


Explain ADO.NET in brief. ADO.NET is a very significant feature of .NET Framework, which is used to work with data that is stored in structured data sources, like databases and

Xlsx/Csv File Reader Need C# MVC coder that will do the following- Take a filepath for an online xlsx, xls or csv file (must be able to handle each of these formats) as well

I want to make new website. I want to make new website. Previous site was not good and I need better one with not only static but using also more details. Skills required:

How can you increase SQL performance? 1)Keep your indexes as narrow as possible. This reduces the size of the index and decrease the number of reads needed to read the index.

how can we use entity framework in ASP.Net MVC

I need Isometric Exploration Tablet Game I am endeavoring to build an 2D tile-based isometric game, primarily for Android and iOS tablet devices. It will be built in Unity 3d v4

What does Xml Validating Reader class do? The XmlTextReader class does not validate the contents of an XML source against a schema. The correctness of the XML documents can be

I need C# AAC sound receiver over WCF Project Description: I want a WCF method which is able to receive a byte stream of an AAC sound file from iPhone device and save it on t