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
In which situation is coauthoring of presentations primarily utilized?
fenix001 [56]

Answer:

C) Multiple reviewers have to be able to view one another's changes after they are made.

Explanation:

5 0
3 years ago
Was LDAP version2 an internet standard in 1998? is it now?
mamaluj [8]

Answer Explanation:

LDAP stand for lightweight directory access protocol 389 is its port number it is an application layer protocol it was first invented in march 1998 and become very popular widespread  internet standard in august 1998 its authentication method is very simple the client send user name and password to LDAP server to access this.

4 0
3 years ago
Is there any app that understands fake photos<br><br><br>help me i need to know it​
Lapatulllka [165]

Answer:

Tineye Image Recognition. This app allows users to upload a picture or a URL to trace where else it appears online. ...

Reversee. This app stays true to its name. ...

Camfind. ...

Reverse Image Search.

7 0
3 years ago
Read 2 more answers
Rebecca completed work on a computer and is verifying the functionality of the system when she finds a new problem. This problem
MariettaO [177]

Answer:

a. Report the new problem

Explanation:

Policies are an essential component of any organization and are important because they address pertinent issues.

Reporting the new problem would make it simpler for her and her colleagues who might encounter similar issues. It would also help the management to understand why it happened, assist her, set priorities and prevent recurrences.

3 0
4 years ago
Which part of the cryosphere comes directly from the atmosphere?
marin [14]
The answer to this question is C.
4 0
3 years ago
Read 2 more answers
Other questions:
  • If the Update Automatically option is chosen in the Date and Time dialog box, _____. the date will automatically change each tim
    7·1 answer
  • Write a program that reads a stream of integers from a file and writes only the positive numbers to a second file. The user shou
    5·1 answer
  • How to show neither precious nor accurate
    13·1 answer
  • What are the examples of shareware?
    9·2 answers
  • Michael is trying to remember his friend’s new cell phone number. He repeats it in his mind until he gets the new number entered
    8·2 answers
  • Write a while loop that prints that number doubled without reaching 100. Follow each number with a space. After the loop, print
    12·1 answer
  • Which of the following is false? A. The last element of an array has position number one less than the array size. B. The positi
    9·1 answer
  • Original list:0,0,0,0,0,0,0,0
    10·1 answer
  • You do not need to remove the lead weights inside tires before recycling them. A) TrueB) False
    15·1 answer
  • A list is sorted by selecting the largest element in the list and swapping it with the last one. This technique is called ______
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!