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
Can you give a practical implementation of FAÇADE patterns? The Façade pattern sits on the top of lot of the subsystems & makes access easy to interfaces of these subsystems. T

Why do we use the XMLHttpRequest object in AJAX? The XMLHttpRequest object is used by JavaScript to transfer XML and other text data among client and server. The XMLHttpRequest

What is Service Oriented architecture? The "Services" are the components which expose well defined interfaces and these interfaces communicate through XML messages. By Using th

Explain different software development life cycles. The System Development Life Cycle (SDLC) is the overall process of developing information systems through multi stage proces

What are benefits and limitations of using Cookies? The benefits of using cookies for state management are as follows:- 1)    There is no server resources required as they a

What is Object Relational Designer? The 0/R Designer provides a visual design surface to make LINQ to SQL entity classes and associations (relationships) that are based on obje

Explain the concept of constructor? Constructor is a special method of a class, which is called automatically when the instance of a class is formed. It is created with the sam

This is a project specifically made for shirohime. Skills required: .NET, Fashion Design, Virtual Assistant

Develop a Earnings Calculator for my Paid to Click Website Project Description: I want a calculator which will show my members how much they could earn, with value per click,

Briefly explain the characteristics of value-type variables that are supported in the C# programming language. The variables that are based on value types directly contain valu