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
Java Homework:(The Person, Student, Employee, Faculty, and Staff classes) Design a class named Person and its two subclasses nam
miss Akunina [59]

Answer: Wait, so what is the question exactly..?

8 0
3 years ago
In linux, a(n) ____ is a data structure that stores all information (such as file permissions, ownership, and file type) about a
Galina-37 [17]
Hi,


Answer => <span>Inode


Good Lessons </span>
4 0
3 years ago
What are files that are placed on a computer by some websites when the user visits the site?
Otrada [13]

Answer:

A: Cookies.

Explanation:

Usually you will get a message about the site using "cookies" to help user experience.

3 0
3 years ago
Write switch-case statement that displays the following information if the temperature is the input Activities at Lake LazyDays
Marta_Voda [28]

Answer:

//here is code in c++.

#include <bits/stdc++.h>

using namespace std;

int main()

{

// variable

int temp;

cout<<"Please enter the temperature:";

//read temperature from user

cin>>temp;

int n;

// reduce the case for switch

n=temp/10;

// print output according to the switch case

switch (n) {

case 7:

case 6:

cout<<"tennis"<<endl;

break;

case 5:

case 4:

cout<<"golf"<<endl;

break;

default:

if(temp>=80)

cout<<"swimming"<<endl;

else

cout<<"skiing"<<endl;

break;

}

return 0;

}

Explanation:

Read the value of temperature from user and assign it to variable "temp".

Calculate n=temp/10, to limit the number of cases in the switch statement.

if temperature is greater or equal 60 & less than 80, it will print "tennis".

If temperature is greater or equal 40 & less than 60, it will print "golf".

in default case, if temperature is greater than 80, it will print "swimming".

if less than 40, print "skiing".  

Output:

Please enter  the temperature::67                                                                                        

tennis

3 0
3 years ago
What is the term for a media piece that is ineligible for protection by copyright laws,
Nataliya [291]

Answer: D. Public domain

Explanation:

Hi, the term Public domain is applied to works of authorship that are ineligible for protection by copyright laws, because the copyright has expired or it was never copyrighted in the first place.

Public domain may vary in different countries and jurisdictions, for example; a media piece may be protected by copyright in one specific country, and be public domain in other countries.

Feel free to ask for more if needed or if you did not understand something.

6 0
3 years ago
Other questions:
  • Tommy has hired a marketing company to create a billboard advertisement
    11·2 answers
  • Write a program that asks the user to enter a birth year. the program should then indicate which generation a person of that yea
    14·1 answer
  • How to do pseudocode and flowchart in BMI ( computer programming ​
    11·1 answer
  • How can you troubleshoot Internet access problems?
    11·1 answer
  • Text can be easily moved from one location to another using _____.
    15·1 answer
  • After clicking the Start button on your computer screen desktop, what option would you then select to examine system components
    15·1 answer
  • Help me find the difference between these logos
    10·2 answers
  • In which situations would it be most helpful to filter a form? Check all that apply.
    8·1 answer
  • PLEASE ANSWER THIS ASAP‼️
    10·2 answers
  • Outside of a C program, a file is identified by its ________while inside a C program, a file is identified by a(n) ________. fil
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!