My code has passed all the test cases but when I tried for inputs greater than 10 my pattern is getting disturbed. Could you please help me out?
Inverted Hourglass pattern
Hey @Sharleen-Clement-3051084341644767 first of all let me tell you you have wrote a clean code which is appreciable. Secondly, why you are getting distorted output for digits greater then 10 is because in this case you have 2 different digits which is of ones place and another is tens. Tens place digit are taking 2 units of space in your output and ones place digit are taking 1 units of space in your output which causes distortion. Solution for that can be function setw() but there’s no need for that as test cases are designed without use of setw()
Hope this would help you 
1 Like