Arrays Introduction

  • + 1 comment

    In first for loop if you replace cin >> arr[i] with following: int x; 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:

    8 6676 3216 4063 8373 423 586 8850 6762