please see this problem
How to take continously input when it is not given how many times i have to take input
@mayurjhode55 in this question n will be given. Please read the input format carefully.
In questions where size of input is not given you can read input using a while loop with condition !cin.eof()
usage:
int n;
cin >> n;
while (!cin.eof()) {
//do something
cin >> n;
}
sorry ma’am that was not the question which i want to ask,by mistake it was sent .
The actual question is
hi @mayurjhode55 please see the above reply I have explained how to take input when input size is not given.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.