JAVA_CODINGS Telegram 37
25. Floyd Triangle
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

import java.util.Scanner;

class FloydTriangle
{
public static void main(String args[])
{
int n, num = 1, c, d;
Scanner in = new Scanner(System.in);

System.out.print("Enter the number of rows of floyd's triangle : ");
n = in.nextInt();

System.out.println("Floyd's triangle :-");

for (c = 1; c <= n; c++)
{
for (d = 1; d <= c; d++)
{
System.out.print(num + " ");
num++;
}

System.out.println();
}
}
}

@java_codings



tgoop.com/java_codings/37
Create:
Last Update:

25. Floyd Triangle
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

import java.util.Scanner;

class FloydTriangle
{
public static void main(String args[])
{
int n, num = 1, c, d;
Scanner in = new Scanner(System.in);

System.out.print("Enter the number of rows of floyd's triangle : ");
n = in.nextInt();

System.out.println("Floyd's triangle :-");

for (c = 1; c <= n; c++)
{
for (d = 1; d <= c; d++)
{
System.out.print(num + " ");
num++;
}

System.out.println();
}
}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Share with your friend now:
tgoop.com/java_codings/37

View MORE
Open in Telegram


Telegram News

Date: |

According to media reports, the privacy watchdog was considering β€œblacklisting” some online platforms that have repeatedly posted doxxing information, with sources saying most messages were shared on Telegram. Some Telegram Channels content management tips Clear Avoid compound hashtags that consist of several words. If you have a hashtag like #marketingnewsinusa, split it into smaller hashtags: β€œ#marketing, #news, #usa. ZDNET RECOMMENDS
from us


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM American