0

How to make this patter in java?

like if I input N ( number of rows ) = 5 the output will be 1234554321 1234**4321 123****321 12******21 1********1

27th Jun 2018, 7:14 AM
Goldstien
Goldstien - avatar
2 Answers
27th Jun 2018, 8:03 AM
Jan Ơtěch
Jan Ơtěch - avatar
+ 1
N rows count and C current line (from 0) then: for any C in N-1from 0: print from 1 to N-C print '*' C*2 times print from 1 to N-C
27th Jun 2018, 8:02 AM
KrOW
KrOW - avatar