I have to do this program for school were I read 3 ints check some condition and print the result. The problem is that the public test case shows something like this:(I just put some arbirtary numbers)
input: ouput:
1 2 3 1
7 1 2 0
6 2 3 0
And some other test cases only show one line:
input: ouput:
6 1 1 1
So, sometimes the input consists of a single line (one single output line) and sometimes of multiple lines (multiple output lines). The code its something as simple as this:
int main(){
int a, b, c;
cin << a << b << c;
if(check(a, b, c)) cout << "1\n";
else cout << "0\n";
return 0;
}
I guess I'm supposed to put the whole input/ouput thing in a loop, so I can do it multiple times. But, when do I know I can stop recieving input and exit the program? How many inputs I'm expecting? How do I know the input is over?