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
One shortcoming of rapid application development (RAD) is _____.
VladimirAG [237]
One shortcoming of rapid application development (RAD) is a narrow focus, which might limit future development.
8 0
2 years ago
List and describe 3 parts (often referred to as 'elements') of a web page?
Art [367]

Answer:

Content

Design

Development

Explanation:

The design and management of sites is internet explorer; it is the research that takes place over time to make a site look fantastic, work quickly and function well with a smooth user interface.

7 0
3 years ago
For which tasks would Excel be useful? Check all that apply.
viktelen [127]

Answer:

Creating charts or graphs

Bringing data together

Storing Financial data

Explanation:

Excel is great at creating charts and graphs

Also good at compiling data

You wouldn't necessarily want to type an essay in excel, so not for writing an essay

You cannot schedule appointments through excel, although I guess if you really wanted to you could organize them in excel

Excel is fine for storing financial data, you can even manipulate it in the program

You cannot draw conclusions using excel directly, although you can organize data in such a way using excel that it makes it easy to identify trends and such for you to draw your conclusions

5 0
2 years ago
In order to average together values that match two different conditions in different ranges, an Excel user should use the _____
ololo11 [35]

Answer:

The answer to this question is the "SUMIFS" function.

Explanation:

The SUMIFS function is a part of Microsoft Excel. It is used to add the number of multi-criteria cells. This function supports logical operators and wildcards. The main purpose to use this function provides a sum of cells with match multiple criteria. The syntax of this function can be given as:  

Syntax:  

=SUMIFS (sum_ranges, range_1, criteria_1, [range_2], [criteria_2], ...)

In the above syntax, we use 5 arguments in function that can be defined as:  

  • The sum_range argument is used to sum of range to be summed.
  • The range_1 and range_2 arguments are stands for first and second ranges for evaluating. In which the range_2 can be optional.
  • The criteria_1 and criteria_2 is used in range, which are range_1 and range_2.

7 0
3 years ago
In this program we are going to practice using the Math class by computing some important values on the unit circle. Using the a
san4es73 [151]

Answer:

The program in Java is as follows:

import java.lang.Math;

public class Trig{

public static void main(String args[]){

for(double angle = 0; angle <= Math.PI; angle += Math.PI / 2){

double cosX = Math.round(Math.cos(angle)*100.0)/100.0;

double sinX = Math.round(Math.sin(angle)*100.0)/100.0;

System.out.println((Math.round(angle*100)/100.0)+" --> "+cosX +" --> "+ sinX);

}}}

Explanation:

This line imports the math library into the program

import java.lang.Math;

This line defines a class

public class Trig{

This line defines the main method

public static void main(String args[]){

This line is an iteration that iterates from 0, through Math.PI using Math.PI/2 as an interval

for(double angle = 0; angle <= Math.PI; angle += Math.PI / 2){

This calculates the cosine of the angle (in radians)

double cosX = Math.round(Math.cos(angle)*100.0)/100.0;

This calculates the sine of the angle (in radians)

double sinX = Math.round(Math.sin(angle)*100.0)/100.0;

This prints the angle in radians, the cosine and the sine of the angle

System.out.println((Math.round(angle*100)/100.0)+" --> "+cosX +" --> "+ sinX);

}}}

5 0
3 years ago
Other questions:
  • Broker Ray is closely acquainted with the Subdivision Heights neighborhood of his town. Over the year, Ray has made it a practic
    7·1 answer
  • A client accessing a network share folder has authenticated into the system and has full access rights to a folder share. But af
    11·1 answer
  • Which of the following might indicate a source on the internet is NOT reliable?
    6·1 answer
  • Which of the following describes the term "false information?"
    5·1 answer
  • Graphic characters used to identify items on an unordered list first line indent is called _______
    8·1 answer
  • When a client computer wants to connect to a service instance, what specific name type does it use to find the service?
    9·1 answer
  • Explain what middleware is. Name a common middleware in two-tier client/server architecture for database applications.
    10·1 answer
  • In which of the following stages of the development process is a team MOST likely to interview a potential user of an app?
    6·1 answer
  • Which steps are needed for word to create an index
    5·1 answer
  • What is HTML? Write some future of HTML.<br>follow for follow ​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!