Thanks to all for showing different approach Originally Posted by rstanley john.c: Except that your minimal correction still skips the first element of the array: Code: for (int i = 0; i < 9; i++) NOT for (int i = 1; i < 9; i++) we assume that first number in the array is smallest number. That's why we are not comparing. It's not good idea to compare same number in twice @john thanks for correction
for (int i = 0; i < 9; i++) NOT for (int i = 1; i < 9; i++)
Last edited by Rahul11; 12-11-2021 at 11:58 AM.
View Tag Cloud