To print the Floyd’s triangle in Java programming, you have to use two for loops, the outer loop is responsible for rows and the inner loop is responsible for columns and start printing the Floyd’s triangle as shown in the following program.
As we know that, Floyd’s triangle is a right angled-triangle using the natural numbers, so the following Java Program ask to the user to enter the range ( how many line he/she want) to print the Floyd’s Triangle.
SOURCE CODE ::
OUTPUT ::
need an explanation for this answer? contact us directly to get an explanation for this answer