18.2k views
2 votes
Without using any additional variables, and without changing the values of ndays or the elements of the parkingTickets array, write some code that results in mostTickets containing the largest value found in parkingTickets.

User Shwet
by
4.9k points

1 Answer

2 votes

Answer:

Step-by-step explanation:

mostTickets=0;

for (k=0; k< ndays; k++){

if (parkingTickets[k]>mostTickets) mostTickets=parkingTickets[k];

}

User We Are All Monica
by
4.6k points