Java Program to print Number Pattern 10101 01010

preview_player
Показать описание

In this video, I have practically demonstrated a Java program to print the below pattern:

10101
01010
10101
01010
10101
Рекомендации по теме
Комментарии
Автор

Sir, can you please elaborate how "System.out.println(); " statement will take us to next line

aniketsaharan
Автор

Better Solution.

for (int i = 0; i < 5; i++) {

for (int j = i; j < 5 + i; j++) {
if (j % 2 == 0)
System.out.print("0");
else
System.out.print("1");
}
System.out.println();
}

mdsiddiq
Автор

please explain these question in python langaugae

shalupatidar
join shbcf.ru