WHAT'S NEW?

Printing the Floyd Triangle








class Floyd
{
public static void main(String[]args)
{

int i,j;
for(i=1;i<=4;i++)
{
for(j=0;j<i;j++)
{
System.out.print(((i+j)%2)+"\t");
}
System.out.println("\n");
}

}
}

0 comments:

Post a comment