how to correct my logic for all inputs like it was printing for 7 as input and then increase decrease value according to the pattern.
how to correct my logic for all inputs like it was printing for 7 as input and then increase decrease value according to the pattern.