How ca n i change my value of cst in manmohan loves pattern 2 so that my logic becomes easier

i am not bei ng able to understand about what logic to use in this program

Hi @Hemanshu_raina,
In this problem the first line will contain only 1 and always and the second will contain two 1. Then the pattern is if you start index i of loop from 0 then you will have the line number as for 2 it is third line times you have to print like here you have to print 3 times and you have to print the index i twice and fill the remaining space with 0 . as in case of line 3 you will write 202 and in case of line 4 you will have 4 time printing out of which two times will be the index and to fill the rest will be two zeroes in between . the final output will be 3003.

Please send me your code i will review it .

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.