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
jonny [76]
3 years ago
5

Which one of the following is the correct code snippet for calculating the largest value in an integer array list aList?

Computers and Technology
2 answers:
vodka [1.7K]3 years ago
7 0

Answer:

Option a.  int max = aList.get(0); for (int count = 1; count < aList.size(); count++) { if (aList.get(count) > max) { max = aList.get(count); } }

is the correct code snippet.

Explanation:

Following is given the explanation for the code snippet to find largest value in an integer array list aList.

  1. From the array list aList, very first element having index 0 will be stored in the variable max (having data type int).
  2. By using for starting from count =1 to count = size of array (aList), we will compare each element of the array with first element of the array.
  3. If any of the checked element get greater from the first element, it gets replaced in the variable max and the count is increased by 1 so that the next element may be checked.
  4. When the loop will end, the variable max will have the greatest value from the array aList.

i hope it will help you!

ExtremeBDS [4]3 years ago
3 0

Answer:

dont delete this question until u can crack this code

Explanation:

    1

   1 1

   2 1

 1 2 1 1

1 1 1 2 2 1

3 1 2 2 1 1

crack this code!!!!

You might be interested in
Universal Containers is tracking the interviewer's ratings of candidate in Salesforce. They would like to easily link the Candid
uranmaximum [27]

Answer:

Hierarchical is scenario is used to between condition and ratings.

Explanation:

Master   -details its open up all details of the candidate and his rating to Universal Containers is tracking by interviewer ratings. where they are no classified. Just data collection.

Lookup:- where it fetches all details and further analysis will be a big task.

Search  :- it is a just search where relevant information based on queries.

Hierarchical;- it is further classified and it is very to do analysis and takes decisions.

Since it is classified further drill down is possible and make a good analysis report can be made.

3 0
3 years ago
Add an array, which will store the most recent 5 recent transactions. For the array, add an insert function which will store the
Vika [28.1K]

The answer & explanation for this question is given in the attachment below.

Download docx
4 0
3 years ago
Write a program which asks the user to enter N numbers. The program will print out their average. Try your program with the foll
Likurg_2 [28]

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // variables

int n;

double average,sum=0,x;

cout<<"enter the Value of N:";

// read the value of N

cin>>n;

cout<<"enter "<<n<<" Numbers:";

// read n Numbers

for(int a=0;a<n;a++)

{

   cin>>x;

   // calculate total sum of all numbers

   sum=sum+x;

}

// calculate average

average=sum/n;

// print average

cout<<"average of "<<n<<" Numbers is: "<<average<<endl;

return 0;

}

Explanation:

Read the total number from user i.e "n".Then read "n" numbers from user with for loop and sum them all.Find there average by dividing the sum with n.And print the average.

Output:

enter the Value of N:5

enter 5 Numbers:20.5 19.7 21.3 18.6 22.1

average of 5 Numbers is: 20.44

7 0
3 years ago
Explain the difference between IPv4 and IPv6.
Leni [432]

Answer:

The Internet Protocol version 4 (IPv4) is a protocol for use on packet-switched Link Layer networks (e.g. Ethernet). IPv4 provides an addressing capability of approximately 4.3 billion addresses. The Internet Protocol version 6 (IPv6) is more advanced and has better features compared to IPv4.

Explanation:

Without IP addresses, computers would not be able to communicate and send data to each other. It's essential to the infrastructure of the web. A: IPv6 is the sixth revision to the Internet Protocol and the successor to IPv4

5 0
3 years ago
Why isn't my brainly camera working? I got Brainly Plus and can't even scan questions. I've logged out, I've uninstalled and rei
N76 [4]

Answer:

Try resetting your device.

Explanation:

In order to send and receive iMessages to your iPhone, iMessage must be enabled. By doing this, you will associate your phone number with the email address used for your Apple ID or iCloud account.

8 0
3 years ago
Other questions:
  • Juliet is trying to increase her savings account and she decides that she is going save an additional $700 every month. If her m
    9·1 answer
  • Write a method that will receive 2 numbers as parameters and will return a string containing the pattern based on those two numb
    10·1 answer
  • What was one of the first inventions that made it possible to communicate almost instantly?
    11·1 answer
  • Extend to also calculate and output the number of 1 gallon cans needed to paint the wal. Hint: Use a math function to round up t
    12·1 answer
  • Science can give us
    5·2 answers
  • Draw a circuit with a 12-volt battery, a 100 ohms resistor in series, and two resistors (each of value 200 ohms) in parallel. Wh
    9·1 answer
  • Write a program. in QBAsSIC
    13·1 answer
  • Write about virus in five points.​
    8·1 answer
  • We have studied machine cycle in class. Suppose that each of the four modules of machine cycle is taking 2 seconds. If there are
    5·1 answer
  • What kind of company would hire an Information Support and Service employee?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!