Print floyd''s triangle - c# program, DOT NET Programming

Print Floyd's Triangle - C# Program

I am unable to make out how to print Floyd's Triangle in C# language. Can anyone suggest me any example for this.

Posted Date: 2/11/2013 8:14:19 AM | Location : United States





This code will help you.

Program:

using System;  

class FloydsTriangle1

{

public static void Main()

{

int i,j,k=1;

Console.WriteLine(" *** Floyd''s Triangle - Normal Numeric Mode **** ");

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

{  // 13 is the height of the triangle

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

{  // each time the number per line is incremented by 1

Console.Write(k++ + " "); // k is the actual data (number) which will be printed.

}

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

}

Console.ReadLine();

}

Posted by | Posted Date: 2/11/2013 8:17:59 AM

The floyd''''s triangle normal numeric mode:

2 3
4 5 6 
7 8 9 10
11 12 13 14 15 
16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 32 33 34 35 36
37 38 39 40 41 42 43 44 45
46 47 48 49 50 51 52 53 54 55
56 57 58 59 60 61 62 63 64 65 66
67 68 69 70 71 72 73 74 75 76 77 78
79 80 81 82 83 84 85 86 87 88 89 90 91

Posted by Robert | Posted Date: 2/11/2013 8:19:25 AM


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

Write discussion on Print floyd''s triangle - c# program
Your posts are moderated
Related Questions
What is nested Classes? You can access an array using the INDEX value of that array, but how many times you know the real value of the index. The Hashtable provides a way of ac

What are the  steps of acquiring a proxy object in Webservice? The following steps are required to get a proxy object of a webservice at the client side:- 1.     The Clie

Develop Outlook Add-In for all versions I need simple code for Outlook(express,2003,2007,2010,2013) Add-In with functionality to repeatedly send CC to the specified email(s), th

Project Description: Hi I am seeking for an MVC developer who is good at Online Store, CMS and Ecommerce. Skills required: .NET, HTML, eCommerce, Shopping Carts, Website D

Can we get a strongly typed resource class? You can now get strongly types classes in the VS.NET intellisense as shown in the figure below. Figure: - Strongly typed re

I want C# routines for website back end Project Description: We want some routines written in C# (.NET) to: * Parse some RESTful APIs to transform and push data to RabbitM

Project Description: We have a reconciliation tool, written in VB.Net that selects customer data (email, addresses, etc) from three different data sources and compares them with

We need vb.net windows application programmer with min six years exp to work on our email marketing project Project Description: We need a windows application vb.net programm

Windows Phone 8 Player - Radio Live Streaming Native XAML and C# Project Description: Player for Windows Phone 8 Scope: The project evolves the development of app using

What is the namespace in which .NET have the data functionality classes? System.data : This namespace contains the basic objects used for accessing &  storing relational d