0
How do I take the input in this case?
I need to take input a pair of integer for each test case,but the test case number isn't given.i.e SAMPLE INPUT: 1 2 3 4... I could use cin in a for loop but how do I know when to terminate the loop? It would be better to show the solution in C++
2 Answers
+ 2
U can simply use
cin>>int1>>int2;
+ 1
I think you want something like this:
while(cin>>i1>>i2){}