How will I stop reading input if the test cases are not provided but is assumed that the input is greater than 1 I looked into CodeChef FAQ and it says that using scanf somehow deals with this problem but im afraid I cant use it because in my subject Programming101 we were only taught about cin and cout to deal with input and output and we are expected to follow it