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
Project Description: Specifically i need develop one web based application which have student registration and according to semester and each time it will change as per semester

Describe all elements in Static Chart diagrams. Package: - The Package logically groups element of a UML model. Class: - The Class describes all set of objects with

What is Dynamic Language Runtime (DLR)? DLR is a runtime environment that permits you to integrate dynamic languages with the Common Language Runtime (CLR) by adding a set of s

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Textilepro.frmLogin.resources" was correctly embedded or linked into assembly

What is the difference between int and int32. There is no difference among int and int32. System.Int32 is a .NET Class and int is an alias name for System.Int32.

What are the different types of replication supported by SQL SERVER? There are 3  types of replication supported by SQL SERVER which are shown below:- 1) Snapshot Replicati

Produce a server setup where I have access to ip address Project Description: I would require using ftp or remote desktop to put software on your server (must be a united sta

Assembly: 1) Assembly is a unit of deployment such as EXE or a DLL. 2) An assembly consists one or more files (dlls, exe's, html files etc.),& represents a group of resources,

How can we load multiple tables in a DataSet ? objCommand.CommandText = "Table1" objDataAdapter.Fill(objDataSet, "Table1") objCommand.CommandText = "Table2"

Want a asp.net developer with SQL server and c# Project Description: I have a project that needs some changes to it. The project is 95% complete. It is designed on asp.net, p