Increasing Decreasing Sequence

what is the prob in my code im not getting it,
plz help