I have this piece of code, array of 7 days, the user enter which day and how many tickets per day.
the loop will continue untill the number is greater than 50(of total tickets).
I want to pick the most wanted day, and the less one.
This is the code:

```
int ticketCounter=0;
final int MAX_TICKET=50;
int[] dayOfTicket=new int[7];
int mostWantedDay=dayOfTicket[0];
int LessWantedDay=dayOfTicket[0];
int indexOfWantedDay=0;
int indexOfLessWantedDay=0;
 while(ticketCounter<=MAX_TICKET){
    System.out.println("Enter the day number (1-7) and the number of tickets:");
    int whichDay=s.nextInt();
    int numberOfTicket=s.nextInt();

        if(whichDay>0 && whichDay<8){
        dayOfTicket[whichDay-1]+=numberOfTicket;
        ticketCounter+=numberOfTicket;
        }else{
        System.out.println("Invalid input.\n");
        }   
    }
}
    for(int f=0;f<dayOfTicket.length;f++){
        if(dayOfTicket[f]>mostWantedDay){
            indexOfWantedDay=f+1;
        }
        if(dayOfTicket[f]<LessWantedDay){
            indexOfLessWantedDay=f+1;
        }
System.out.printf("The day with max tickets is: %d \nThe day with min tickets is: %d \n\n",indexOfWantedDay, indexOfLessWantedDay);        

```

it is picking wrong most wanted day, and always print 0 as less wanted day.
I have some problems with this checking method on the last for loop.
I will aprriciate your help.
thanks

EDIT: I took out the for loop outside the WHILE ( it was my copy paste mistake)