answer.
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
krok68 [10]
2 years ago
13

Assume that two parallel arrays have been declared and initialized: healthOption an array of type char that contains letter code

s for different healthcare options and annualCost an array of type int. The i-th element of annualCost indicates the annual cost of the i-th element of healthOption. In addition, there is an char variable, best2.Write the code necessary to assign to best2 the health option with the lower annual cost, considering only the first two healthcare options.
Computers and Technology
1 answer:
eduard2 years ago
6 0

/*

Since we have to check the first two options only as mentioned in last part of question the loop will work 2 times only and will compare the cost of first element and second and assign the healthoption accordingly

*/

for(int i =0;i<=1;i++){

if(annualCost[i]<annualCost[i+1]

best2 = healthOption[i]

else

best2 = healthOption[i+1]

}

You might be interested in
Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Follow each number by a space. Example
jasenka [17]

Answer:

public class Main

{

public static void main(String[] args) {

    int userNum = 40;

    while(userNum > 1){

        userNum /= 2;

        System.out.print(userNum + " ");

    }

}

}

Explanation:

*The code is in Java.

Initialize the userNum

Create a while loop that iterates while userNum is greater than 1. Inside the loop, divide the userNum by 2 and set it as userNum (same as typing userNum = userNum / 2;). Print the userNum

Basically, this loop will iterate until userNum becomes 1. It will keep dividing the userNum by 2 and print this value.

For the values that are smaller than 1 or even for 1, the program outputs nothing (Since the value is not greater than 1, the loop will not be executed).

4 0
2 years ago
Thomas has signed a deal with a production house that allows them to use his images on their website. What is required when imag
Phoenix [80]
D. Fair use. Because you need to give credit to the owner.
4 0
2 years ago
Read 2 more answers
Which of the following are true statements about digital certificates in Web browsers?I. Digital certificates are used to verify
vladimir2022 [97]

Answer:

I only

Explanation:

Digital certificate are virtual encrypted keys or password used by individuals or organization  as a means of establishing secure connections between servers and websites so as to  be able to authenticate that only the legitimate people are having access to the information.

6 0
1 year ago
Where does an MPLS label go in a PDU?
Natalija [7]

Answer: Between Layers 2 and 3

Explanation:

In between Layer 2 and Layer 3 the MPLS header is present and is known as Shim header. It is also said to be in 2.5.

6 0
1 year ago
Frequency of failure and network recovery time after a failure are measures of the _______ of a network.
coldgirl [10]
Frequency of a failure and network recovery time after a failure are measures of the Reliability of a network
8 0
1 year ago
Other questions:
  • Instructions:Type the correct answer in the box. Spell all words correctly.
    5·2 answers
  • When a typeface does not have any extra embellishments on the top and bottom of the letterforms, it is called a ________ font?
    12·1 answer
  • Is used to process certificates and private/public key information?
    12·1 answer
  • When using preventative insecticides which holiday period should trigger an application?
    15·2 answers
  • Someone else can drive your car if _____.
    12·2 answers
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    12·2 answers
  • A queueing system has four crews with three members each. The number of "servers" is:
    5·2 answers
  • Which of the following should get a Page Quality (PQ) rating of Low or Lowest? Select all that apply. True False A page with a m
    8·1 answer
  • Nathan would like to save his PowerPoint presentation as a video that can be replayed easily on any device at full quality. Whic
    14·1 answer
  • Which option in the Caption dialog box configures whether the caption appears above or below the image
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!