Questions

Read the input till the end using C++ in competitive programming?

0

I am solving a competitive programming question where I need to take input till the end.

Input:

10100101111011111111
00000000000000000000
01011101110110101111
        .
        . 
        .
        .

I am not knowing how much input I have tot take.



asked 1 year, 11 months ago
Reputation: 1





1 Answer

0

We can take this type of input using the below code.

string inp;

while (!cin.eof()){
    cin>>inp;

    cout<<inp<<endl;
}

answered 1 year, 11 months ago
Reputation: 1





Your Answer

Nothing to preview

Post Answer



Asked:  1 year, 11 months ago
Viewed:  1110 times
Active:  1 year, 11 months ago