hiiiii plz can any body tell me how to dram following pattern in java using for loop


10001
01010
00100
01010
10001

such that number 1 form diagonal

thanks

What are you required to use? You can do this with simple println.

Ok, you edited your post, It's useful to tell me that.

What are you required to use? You can do this with simple println.

Ok, you edited your post, It's useful to tell me that.

can u plz tell me the code for that using for loop it is urgent

Do you see any pattern for where the 0s and 1s are located in each line?
The 1s move in until there is only a single 1 and then they move out.

it is urgent

Oh. For urgent jobs, that will cost more.