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
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

i want decompile ex5 files Project Description: i want decompile some ex5 files like indicators, scripts and eas i need in format mq5 can do this to me? Skills required

Explain the limitations of AJAX. The following are the limitations of AJAX: It is complex to bookmark a particular state of the application. Function given in the code-be

ILDASM When it comes to the understanding of the internals nothing can beat ILDASM. ILDASMĀ  converts all the exe or dll into IL code. To run ILDASM you have to go to "C:\Progra

Work on different coding using visual studio 2012/2013 writing Java script as well as C# codes. Project Description: I want to shift to new Programming Env. and I would like

Project Description: We want to design and develop a new Sportbook Platform from scratch, subsequent functionality: - Have a full functionality like other similar websites (S

Explain ADO.NET in brief. ADO.NET is a very significant feature of .NET Framework, which is used to work with data that is stored in structured data sources, like databases and

We need Long term Kentico developer needed I want a solid Kentico developer that I can rely on to handle overflow work. Usually this will include about 5 hours of work each week

Project Description: Digital invy - inventory management Main Features User friendly windows based software Multi Branch Multi company facility Multi user Integra

What is project management? Applying the knowledge, skills, techniques, tools in project and deliver project deliverable is a short definition of the project management. It's b