// program for floyd triangle in numbers
import java.io.*;
public class ssva09
{
public static void main(String arg[]) throws IOException
{
int i,j,s=0,n;
BufferedReader inp=new BufferedReader(new InputStreamReader(System.in));
System.out.println("\n\t\tFloyd Triangle in Numbers");
System.out.print("\nEnter the value of N: ");
n=Integer.parseInt(inp.readLine());
if (n==0)
{
System.out.println("\nPlease Enter greater than Zero\n");
return;
}
for (i=1;i<=n;i++)
{
for (j=1;j<=i;j++)
{
s++;
System.out.print("\t" + s);
}
System.out.println();
}
}
}In this program, easy to understand Floyd Triangle program using java.
