Hey guys ,I'm a beginner of C++,
I'm stuck on a perticular problem in which a user is asked to input a number less than 10.
For instance 8.
then the output will be like 1 2 3 4 5 6 7 8 6 5 4 3 2 1 get it? it will count till the input number and then count back to one.
The main issue about this problem is that everything has to be done in a If/esingle for-loop.lf/else statements are not allowed and using any extra variable outside the loop is also not allowed.