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
Tresset [83]
3 years ago
14

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 ndays has been declared and initialized to hold the size of the array. (Thus, if today were January 18, ndays would have the value 18; if today were February 3, ndays would have the value 34.) In addition, a variable named mostTickets has been declared, along with a variable k. 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.
Computers and Technology
1 answer:
WINSTONCH [101]3 years ago
3 0

An array of integers named parkingTickets has been declared and initialized to the number of parking tickets given out by the city police each day since the beginning of the current year.

Explanation:

  • A variable named ndays has been declared and initialized to hold the size of the array.
  • 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.
  • If today were January 18, ndays would have the value 18; if today were February 3, ndays would have the value 34

mostTickets=0;

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

{

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

}

You might be interested in
Besides technical skill, what is the most important factor for staying employed and being offered promotions?
Natali [406]

Obtaining a college degree= while this is nice, you can get a lot of placed with just a GED or Highschool Degree

pursuing self-directed learning=this will help you

showing professional behavior= yes this helps a lot

setting long-term goals= this could help you in the end game

Overall, i think it would be between B and C, though C sounds correct over B because even if you pursue self directed learning, you could still get fired or quit or not get a promotion.

3 0
2 years ago
Read 2 more answers
What is the numerical ratio that is equivalent to 19.2 dB?
mrs_skeptik [129]

Answer: 83.17

Explanation:

By definition, the dB is an adimensional unit, used to simplify calculations when numbers are either too big or too small, specially in telecommunications.

It applies specifically to power, and it is defined as follows:

P (dB) = 10 log₁₀ P₁ / P₂

Usually P₂ is a reference, for instance, if P₂ = 1 mW, dB is called as dBm (dB referred to 1 mW), but it is always adimensional.

In our question, we know that we have a numerical ratio, that is expressed in dB as 19.2 dB.

Applying the dB definition, we can write the following:

10 log₁₀ X = 19.2 ⇒ log₁₀ X = 19.2 / 10 = 1.92

Solving the logarithmic equation, we can compute X as follows:

X = 10^1.92  = 83.17

X = 83.17

4 0
3 years ago
What is distribution hardware?
saveliy_v [14]
A distributed computer system consists of multiple software components that are on multiple computers, but run as a single system. The computers that are in a distributed system can be physically close together and connected by a local network, or they can be geographically distant and connected by a wide area network.
4 0
3 years ago
Which website domains are most credible?
Leokris [45]

Credible websites usually end in the domain name .org or .edu

3 0
3 years ago
Read 2 more answers
K
ollegr [7]
True??????????????????????????
7 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following translates packets so that the node can understand them once they enter through a port?
    8·2 answers
  • 50 pts DO NOT ANSWER FOR POINTS
    9·1 answer
  • Once a graph has been created, you would need to start over to make any changes to it?
    5·1 answer
  • 3. Find the product of (a² +3a+5) x (a+7)​
    7·1 answer
  • FILL IN BLANK FOR THE POINTS!!!!!!
    8·1 answer
  • James has a USB flash drive that he has used at work. The drive needs to be thrown away, but James wants to make sure that the d
    12·1 answer
  • Design a flowchart for an algorithm which adds prim numbers starting from 1 up to 50. Change
    9·1 answer
  • The way a student prepares for a test or reviews academic material is referred to as
    8·2 answers
  • 1.Microsoft Word is a/an ........​
    8·2 answers
  • As a technical support rep, michael is responding to a customer's question sent to him via e-mail. what should michael's first t
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!