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
stiks02 [169]
3 years ago
11

Using the scenario below, answer the following questions:

Computers and Technology
1 answer:
4vir4ik [10]3 years ago
3 0

Answer:

Here is code in java.

import java.util.*;

class Main

{

public static void main (String[] args) throws java.lang.Exception

{

   try{

         boolean flag=false;

         int total_mile=0;

         double avg_mile;

       // part 1, create and initialize array

       int inp[]={2,5,9,11,13,17,20,22,24,26};

       

       System.out.print("miles ran per week: ");

       // print the miles per week of train

       for(int x=0;x<10;x++)

       {

       System.out.print(inp[x]+" ");

       }

        System.out.println();

       //part 2, print the value of index 2 in the list

       System.out.println("value at index 2: "+inp[2]+" miles");

       //part 3, find length of array

       System.out.println("list length: "+inp.length);

     

       // part 4, calculate total mile and average

       for(int y=0;y<10;y++)

       {

       total_mile=total_mile+inp[y];

       }

       System.out.println("total miles ran: "+total_mile+" miles");

       

       avg_mile=total_mile/10.0;

       System.out.println("average no of miles ran= "+avg_mile+" miles");

       

     // part 5, check 4 exist in the list or not

       for(int k=0;k<10;k++)

       {

       if(inp[k]==4)

       {

       flag=true;

       break;

           }

       }

           if(flag)

           System.out.println("4 exist in the list.");

           else

            System.out.println("4 doesn't exists in the list.");  

       

   }catch(Exception ex){

       return;}

}

}

Explanation:

Create and initialize array with list value equals to 2 and maximum value 26. Print the miles of each week.Then find the value of miles at index 2 in the list.Next find the length of the array and print it.Calculate total miles ran of 10 weeks.Then calculate the average miles by dividing the total with 10. In the array, check 4 exist or not.

Output:

miles ran per week: 2 5 9 11 13 17 20 22 24 26                                                                            

value at index 2: 9 miles                                                                                                  

list length: 10                                                                                                            

total miles ran: 149 miles                                                                                                

average no of miles ran= 14.9 miles                                                                                        

4 doesn't exists

You might be interested in
Lord Strawberry, a nobleman, collected birds. He had the finest aviary in Europe, so large that eagles did not find it uncomfort
creativ13 [48]

Answer:

That was a very great story that I totally did NOT read cause it too long 0-0.

Explanation:

To my ferns.....GET ON RN CAUSE I WONLEY T^T

Anyways wuv c'alls and have a good day :3

8 0
2 years ago
What additive keeps engines clean by preventing contaminates and deposits from collecting on surfaces? a. Friction modifiers b.
White raven [17]

Answer is: Dispersants


Explanation:

Dispersants keep contaminants (e.g. soot) suspended in the oil to prevent them from coagulating. Anti-foam agents inhibit the production of air bubbles and foam in the oil which can cause a loss of lubrication, pitting, and corrosion where entrained air and combustion gases contact metal surfaces.

So that's why the answer is: Dispersants

7 0
3 years ago
Read 2 more answers
What provision of the Government Paperwork Elimination Act was designed to encourage a paperless society?
Ratling [72]
<span>Validation of electronic signatures was designed to encourage a paperless society.</span>
8 0
3 years ago
Read 2 more answers
Để các hình chiếu cùng nằm trên mặt phẳng to phải làm gì
goldfiish [28.3K]

Answer:

pls translate to English so we can help

3 0
2 years ago
A 1024-bit message is sent that contains 992 data bits and 32 CRC bits. CRC is computed using the IEEE 802 standardized, 32-degr
Studentka2010 [4]

Answer:

a) Yes

b) Yes

c) Yes

d) No

e) Yes

f) No

Explanation:

a) All single-bit errors  are caught by Cyclic Redundancy Check (CRC) and it produces 100 % of error detection.

b) All double-bit errors for any reasonably long message  are caught by Cyclic Redundancy Check (CRC) during the transmission of 1024 bit. It also produces 100 % of error detection.

c) 5 isolated bit errors  are not caught by Cyclic Redundancy Check (CRC) during the transmission of 1024 bit since CRC may not be able to catch all even numbers of isolated bit errors so it is not even.

It produces nearly 100 % of error detection.

d) All even numbers of isolated bit errors may not be caught by Cyclic Redundancy Check (CRC) during the transmission of 1024 bit. It also produces 100 % of error detection.

e) All burst errors with burst lengths less than or equal to 32 are caught by Cyclic Redundancy Check (CRC) during the transmission of 1024 bit. It also produces 100 % of error detection.

f) A burst error with burst length greater than 32 may not be caught by Cyclic Redundancy Check (CRC) during the transmission of 1024 bit.

Cyclic Redundancy Check (CRC) does not detect the length of error burst which is greater than or equal to r bits.

4 0
2 years ago
Other questions:
  • How to play music out of your apple watch?
    6·1 answer
  • ________ is a password-cracking method wherein the attacker compares passwords to lists of common words.
    12·1 answer
  • What is cyber stalking and how does it work?
    7·2 answers
  • Can anybody tell me how to screenshot on a PC with no "print screen" button?
    11·1 answer
  • I have a very quick question. So im applying for Early college and i need some future educational goals and maybe im just thinki
    6·1 answer
  • Which of the following is NOT a file format used for word processing documents? A. .ppt B. .rtf C. .doc D. .odt
    5·1 answer
  • List of rules for expert systems​
    6·1 answer
  • A customer is looking for a storage archival solution for 1,000 TB of data. The customer requires that the solution be durable a
    9·1 answer
  • What will the following program display in the console?
    12·1 answer
  • How do you code to find the surface area 6 s2, volume s3 in python
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!