Why's my code giving runtime error?
Still getting run error
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.
Mayank i by mistake marked your doubt resolved. Continue here only.
Have edited your code here, now it’s passing all test cases.
What was the error in my code?
Error in your code was
int a[1000]; //size of array should be 10^7
for(int i=0; i<n; i++){
cout<<a[i]<<endl;
//instead of printing in new line we have to print by a white space.
cout<<a[i]<<" ";
}
