0
Help me to rearrange. Thank for help
Rearrange the code to find and print the smallest element of the array (n is the size of the array). } small = arr[x]; cout << small; if(arr[x] < small) for(int x=1; x<n; x++) { int small = arr[0];
2 Antworten
0
I am facing the same rerange problem :(
0
ok here is the right answer :)
int small = arr[0];
for(int x=1; x<n; x++) {
if(arr[x] < small)
small = arr[x];
}
cout << small;