+ 1

print this pattern

1 2 2 3 0 3 4 0 0 4 5 0 0 0 5

27th Jun 2018, 8:08 PM
chandan kumar
chandan kumar - avatar
1 Antwort
0
for(int i=1;i<=5;i++) { for(int j=0;j<i;j++) { System.out.print(j==0 || j==i-1 ? i : 0); } System.out.println(); }
4th Jul 2022, 11:30 AM
Репин Кирилл
Репин Кирилл - avatar