0

Rearrange the code to find and print the smallest element of the array.

int small= arr[0]; for(int x=1; x<n; x++){ if( arr[x]<small small= arr[x]; } cout<<small; if my arrangement is wrong then please correct me??

4th Nov 2016, 7:35 PM
zerin jawah
zerin jawah - avatar
1 Resposta
+ 3
No problem in arrangement.
4th Nov 2016, 7:45 PM
Sumita Das
Sumita Das - avatar