Hi, i'm trying to find the two largest numbers out of ten. I've re-done this problem several times and it still doesn't work. I'm not sure if my logic is wrong or if i'm missing something. Any help would be greatly appreciated.

Code:#include <stdio.h> int main(void) { float number; float largest; float secondLargest; float counter; float temp; printf("Please enter a number:\t"); scanf("%f",&number); number = largest; printf("\nPlease enter a number:\t"); scanf("%f",&number); number = secondLargest; counter = 2; while(counter < 10){ ++counter; printf("\nPlease enter a number:\t"); scanf("%f",&number); if (number > largest){ largest = number; }/*end if*/ if (number > secondLargest){ secondLargest = number; }/*end if */ }/* end while */ if(secondLargest > largest){ temp = largest; largest = secondLargest; secondLargest = temp; }/* end if */ printf("The largest number entered was: %.2f",largest); printf("\nThe second largest number entered was: %.2f",secondLargest); return 0; }/* end function main */