Answer:
Following code will store the largest value in array parkingTickets in the variable mostTickets
mostTickets = parkingTickets[0];
for(int k = 0; k<parkingTickets.length; k++)
{
if(parkingTickets[i]>mostTickets)
{
mostTickets = parkingTickets[i];
}
}
Explanation:
In the above code segment, initially the number of tickets at first index is assumed as largest value of tickets in array.
Then using a for loop each value in the array parkingTickets is compared with the current mostTickets value.
If the compared value in parkingTickets array is larger than the current mostTickets value. Then that value is assigned to mostTickets.
This process is repeated for all elements in array.
Thus after looping through each element of array the largest value in array will get stored in mostTickets variable.
Insert tab
up at the top
have a nice day
The sorted values array contains the sixteen integers 1, 2, 3, 13, 13, 20, 24, 25, 30, 32, 40, 45, 50, 52, 57, 60. How many recu
Licemer1 [7]
The number of recursive calls that have to be done using the binary search is 4.
<h3>How to do the recursive calls</h3>
binarySearch = (45, 0, 15)
start + end / 2 = value
mid = 0 + 15/2 = 7.5
The 7th element = 30
30 is less than 45
8 + 15/3
= 23/2 = 11.5
The 12th element = 52
52 is greater than 45
8 + 11/2
= 19/2 = 9.5
The value of 9 = 40 and 40 is less than 45
10+ 11/2 = 10.5
The tenth value is 45 hence the iteration to be done is 4.
Read more on binary here:
brainly.com/question/21475482
#SPJ1
It depends on how you assemble the solar panel you have to have at lest a 10 v's going in to the battery.