You are viewing a single comment's thread. Return to all comments →
In first for loop if you replace cin >> arr[i] with following:
cin >> x;
arr[i] = x;
That will work otherwise it will fail if you leave your code as it is and try following values it will fail:
6676 3216 4063 8373 423 586 8850 6762
why is it not taking directly input in the array?