i am confused in the input method of question. all inputs are given every time but in code it is taking ch only once in main.
other doubt is in cin>>a>>b as in earlier questions it takes input in same line with a space . but how it is taking in next line input in a and b in this code.
and why we have to use cin in every if statement why we can’t use it once between while and if condition .