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
Full time contractual programming position (mostly scraping, databasing) Project Description: This is a full time contractual role needed for a sports advisory service. We ar

Differentiate between the while and for loop in C#. The while and for loops are used to implement those units of code that require to be repeatedly executed, unless the result

A fresh web project utilizing ASP.NET 4.5, MVC 5 with Visual Studio 2013 a) Excellent web layout DESIGN skills using CSS. b) Solid experience with ASP.NET 4.0 MVC 4. c) Cu

Question 1 A small Canadian law firm specializing in immigration law has what it considers a successful website. One of the most popular features of the website is its newslet

Explain the architecture of ADO.NET in brief. AD0.NET having of two fundamental components: The DataSet, which is disconnected from the data source and does not require to k

Why The JavaScript Validation Not Run on the Asp.Net? The Asp.Net Button Is post backed on the server & not yet Submit & when It goes to the server its states is lost so if we

What is a candidate key? A table may have more than one combination of columns that could uniquely identify the rows in a table; every combination is a candidate key. During th

What is ReaderWriter Locks? You may want to lock the resource only whenever data is being written and permit multiple clients to parallel read data when data is not being updat

how much guys cost for small 5 pages website designing in .net?

What is object-oriented programming (OOP)? OOP is a method to develop logical modules, such as classes that contain properties, methods, fields, and events. An object is formed