Chapter 11 Exercise 6: Program results inaccurate with duplicate numbers in array. · Issue #124 · williamgherman/c-solutions · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In place of:
*second_largest = a[1];
I recommend adding this, rather inefficient, code fragment as a defense against duplicate numbers in the array:
This would also mean changing the if statement in the for loop to:
if(a[i] > *largest)
The text was updated successfully, but these errors were encountered: