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
Define importance of Vitamin c Freezing preserves vegetable and nutrients to a great extent. Vitamin A and β-Carotene are well preserved in spinach, peas and beans, or are mode

What are the different accessibility levels in .NET? The five levels of access modifiers are as follows:- Private: The members of the class only have the access.

What are advantages of SQL 2000 over SQl 7.0? 1)User-Defined Functions: The User-Defined Functions (UDFs) -- one or moreTransact-SQL statements may be used to encapsulate the

What is fundamental of published or precreated objects in Remoting? In the scenarios of the singleton or single call the objects are created dynamically. But in some situations

What is a parameter? Explain the new types of parameters introduced in C# 4.0. A parameter is a special type of variable, which is used in a function to give a piece of informa


How can we use Culture Auto in project? We will make a very simple login screen which we will try to use for English as well as the Greek. The login screen will display Engl

Ask question #Minimum 100 words accepWrite an ASP.NET program that allows you to create and populate a CheckBoxList control by accessing the Title field from the Movies database ta

Question: (a) One problem encountered when designing web applications is that HTTP is a "stateless" protocol. Explain two general approaches to solve the statelessness problem

Different types of remote object creation mode in .NET There are 2 different ways in which the object can be created using Remoting :- 1)SAO (Server Activated Objects) also