My doubt in pattern triangle

i have done this question very correctly with passing all the test cases but i have used bunch of if -else .
please show me the code with lesser if-else!
my code is:https://ide.codingblocks.com/s/101141

Hello @shubham.mehla2000,

You can click here to see my code for the same problem, but without using if-else statements.

Hope, this would help.
Give a like, if you are satisfied.

wait, click where.
sorry sir, i didn’t find your code.

Here. :joy:

1 Like