You are viewing a single comment's thread. Return to all comments →
there should be one more condition in the first while loop
while(cin>>A[i++] and i<N);
otherwise, will be an infinit loop.
thumps up, nice approach
See the comment above, it already has been explained