1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ipn [44]
3 years ago
7

An array of integers named parkingTickets has been declared and initialized to the number of parking tickets given out by the ci

ty police each day since the beginning of the current year. (Thus, the first element of the array contains the number of tickets given on January 1; the last element contains the number of tickets given today.) A variable named mostTickets has been declared, along with a variable k. Without using any additional variables, write some code that results in mostTickets containing the largest value found in parkingTickets.
Computers and Technology
1 answer:
Sedaia [141]3 years ago
6 0

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.  

You might be interested in
WAp to input the radius and print<br> the area of circle
Sergeu [11.5K]

Program:-

\tt r=float(input("Enter\:the\:value\:for\:radius\:of\:circle"))

\tt x=3.14*\:r**2

\tt print("Area\:of\:Circle=\{x\}")

<h3>Sample run:-</h3>

\tt r=3

\tt Area\:of\:the\:circle=28.26

7 0
2 years ago
Is there a way I can put an already made sound that i created over an already made video
lys-0071 [83]
If you're using an apple product to do video editing, then iMovie is probably the best way to do that.

If you're on Windows and you're looking for a free video editing website, I'd suggest WeVideo. Although WeVideo does add watermarks to your videos, editing is pretty easy when using it.
6 0
3 years ago
Which of the following electronic collaboration techniques is the best
muminat

Answer:

D. project management software

6 0
3 years ago
Read 2 more answers
Comments can be compared to a virtual _____.
Vladimir79 [104]
What's the rest of the question? Like A - B - C - D?
3 0
3 years ago
What should a pwc operator do to minimize the risk of accident or injury?
Natasha_Volkova [10]
PWC stands fro personal water craft (aquascooter, jet bike, jet ski, wave runner, ski free, motorised surfboard etc.). The operator of PWC must be at least 16 years old.
In order to minimize the risk of accident or injury the PWC operator must follow several rules:
- the pwc operator should know the boating rules
- to monitor the speed of the vessel to ensure that a safe speed is being maintained.
- to adhere to the 5 knot rule (approximately 10kph) when close to shore, other boats (including boats at anchor) around dive flags and swimmers, fixed structures (ramps and jetties)
3 0
3 years ago
Other questions:
  • Which view In a presentation program displays you’re slides in full screen modes ?
    8·2 answers
  • What lie does E.D. tell to keep the musical from being canceled? There is a television crew coming to do a story on it. Jake wil
    6·1 answer
  • A network protocol is a set of rules defining communication between two devices. True False
    8·2 answers
  • The process of encoding messages or information in such a way that only authorized parties can read it is called ____________.
    7·1 answer
  • Which of the following represent advantages of GPL-licensed software? Check all of the boxes that apply It is always free of cos
    12·2 answers
  • E-mail has made it very easy to send a message to more than one person at any time of day from just about anywhere. If you wante
    7·1 answer
  • Computer networks allow computers to send information to each other. What is the term used to describe the basic unit of data pa
    14·1 answer
  • Pls help
    15·2 answers
  • Which of the following describes the line spacing feature? Select all that apply. adds space between words adds space between li
    8·1 answer
  • Plzzz help i need this today :(
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!