0
Whats wrong in this code ?
7 ответов
+ 1
did you try with ampersands
+ 1
yeah tried not working compilation error
0
swap require pointers like params (adresses of int) but you pass values ...
0
Cannot try you?
0
Somanathareddy Beside swap problem, you have to read every int in a loop then insert they in arr item (not in arr itself)
0
didnt get you can u elaborate more
0
You have to put every int (get from input) in arr items. You cannot use an array with cin but on his items... Example:
int a[5];
for(int i=0; i<5; i++)
cin>>a[i];