Doubt while solving Increasing Decreasing Sequence

please tell what to do now , i am stuck after this!!

please tell me how to fix this

Hey your code is not producing any output
Pls let me know where exactly do you want the help.
Also pls comment your code or explain your logic here

mam , please tell what will be the code to check codition of firstly decreasing and then increasing series