Pattern inverted hour glass

in this program when i input n as a number <= 10, then i get correct figure but when i input any number > 10, then the right hand side of the figure gets distorted like this -

my logic is correct and my code is also accepted with 100 marks when i submitted it.

i wrote this code -

@pushkar24sharma if n >= 10 then you’d have to print 2 digits instead of 1 at some places, so the pattern will not look symmetrical anymore.

Please mark your doubt as resolved in case of no further queries.

1 Like

thank u @Ishitagambhir maam

1 Like