answersLogoWhite

0


Best Answer

import java.io.*;

class floyd

{

public static void main(String args[])

{

int i,j,k=0,l,n;

system.out.println("enter the no of iteration is"+n);

for(i=1;i<=n;i++)

{

for(j=1;j<=i;j++)

{

k++;

a=k%2;

system.out.println(""+a);

}

for(l=i;l<=n;l++)

{

k++;

}

system.out.println("\n")

}

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Modify the program in Java to produce the following form of Floyd's triangle 1 01 101 0101 10101?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

How many albums did the wall produce to date?

how many albums did pink floyds the wall sell to date


What is Emily Floyds favorite color?

rainbow.


What is the phone number of the Green Sea Floyds Library in Green Sea?

The phone number of the Green Sea Floyds Library is: 843-392-0994.


Where is the Navilleton Schoolhouse Inc in Floyds Knobs Indiana located?

The address of the Navilleton Schoolhouse Inc is: 7721 Navilleton Road, Floyds Knobs, IN 47119-8605


Where is the Floyd Action Network in Floyds Knobs Indiana located?

The address of the Floyd Action Network is: Po Box 211, Floyds Knobs, IN 47119-0211


Where is the Green Sea Floyds Library in Green Sea located?

The address of the Green Sea Floyds Library is: 5331 Hwy 9, Green Sea, 29545 4949


Where is the Southern Indiana Botanical Society Inc in Floyds Knobs Indiana located?

The address of the Southern Indiana Botanical Society Inc is: Po Box 311, Floyds Knobs, IN 47119-0311


How much did Pink Floyds movie the wall cost to make?

$12,000,000


What are the ingredients for Keith Floyds Welsh Rarebit?

Rabbit, carots and pork


Which Pink Floyds album led to a spin-off film?

The Wall


When was Pink Floyds last concert with all original members?

soy\


Who was Pink Floyds first date?

Pink Floyd isn't a person you retard noob