Pattern number pyramid

sir can i take only one variable i.e val instead of count in the loop of increasing and decreasing no, after what will be the syntax for increasing and decreasing no loops?

@rahulkumarraj220 no you cant use as cnt is starting from 1 and val from i , also its better to use diff variables to make it less complex.
hope its clear if yes dont forget to hit like and mark resolved :smiley:

1 Like