I just want to ask what should be the way to do it, not asking for code.
So currently, I declare 2 variables: largest and second largest.
I go thru the array of integer, and state:
Please correct me
So currently, I declare 2 variables: largest and second largest.
I go thru the array of integer, and state:
if (array[i] > largest){
largest = *array[i];} else if (array[i] > second largest) { second largest = *array[i]};
Please correct me