Report this Article

The form of Floyd’s triangle


  • Comments 0
  • Views 0

Floyd’s triangle is a series of numbers that are sequentially spread across a series of rows. It is used to teach computer programming basics. The first row contains a 1 by itself, and the second row contains 2 and 3. The next row holds 4, 5 and 6, and the numbers continue in this pattern infinitely. A right triangle results, with numerals spaced at even intervals.

The form of Floyd’s triangle is not complicated. Most of the trick is in designing a program to generate the numbers in order and with the proper spacing, with only minimal commands. Computer programming instructors teaching both Java and C++ frequently assign Floyd’s triangle problems to students to teach fundamental programming principles.

Building the triangle’s formula involves complex math and integer solving skills that are essential in larger programming projects. Each progressive row of the triangle builds on the prior, but is not a sum total. To generate a computer program that will systematically build the triangle out to a certain specified size, students must understand integer mathematics and apply it to the script language and unique lexicon of computer coding.

Properly coding Floyd’s triangle requires a mastery of loops. In C++ and Java coding, loops are code structures that depend on statements or groups of statements being executed multiple times. The statement must contain an undefined integer that becomes defined in a unique way with each loop.

Pretty Little Liars Season 3 Episode 1 Premiere Online Aria, Emily, Hanna and Spencer found out about Mona being “A” and Maya’s death. With the terror seemingly over and an alleged murderer now behind bars, the town of Rosewood is slowly healing from old and new wounds and trying to get back to normalcy.

Share

Hansaa Hajsaha Article's Source: http://articles.org/the-form-of-floyds-triangle/
Author:


  • Posted On June 5, 2012
  • Published articles 10

Post Comment