Wrong testcase in this problem

i am getting test case no 8 wrong, please help!!
my code- https://ide.codingblocks.com/s/120024

Hey @SATVIK,
Sorry for the late response.
TestCase 8:
7
10
7
6
5
3
2
1
For this input answer should be true, whereas your program is giving output as false.
Try to understand the logic behind the series.
If you don’t get it. I will provide you with a solution.

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.