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
krok68 [10]
3 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:
eduard3 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
Add me as a friend on Real pool 3D so we can play a round of pool!!!
Sloan [31]

I will but i have to wait till after 3;00 will you still be online by then. If not you can just friend me and message me when you are today

8 0
3 years ago
What is TRUE about the following array?
mr Goodwill [35]
<span>d. someVals[1] has the value of 4</span>
3 0
4 years ago
Write 4 types of network_based<br>on geographical area covered<br>by them​
ikadub [295]

Answer:

Network based coverages are LAN, WAN, MAN and WLAN

4 0
3 years ago
Which task, performed by systems developers, will most likely ensure that end users accept a new system?
aalyn [17]
I would say "beta testing" helps to make sure users will accept a system.
6 0
4 years ago
The smaller RAM a computer has, the more software you can have open without impacting the speed of your computer
dsp73
False, forsure mates but gotta love the question:)
4 0
3 years ago
Other questions:
  • Wendy is an attacker who recently gained access to a vulnerable web server running Microsoft Windows. What command can she use t
    9·1 answer
  • A server-side extension ________________. provides its services to the web server in a way that is totally transparent to the cl
    13·1 answer
  • What happens to the data in rom when the power is turned off?
    10·1 answer
  • What is the purpose of an exhaust emission system
    6·1 answer
  • Which of these statements most accurately describes cookies?They have the capability to execute malicious software.Each cookie f
    12·1 answer
  • Which of the following is a correct statement about writing down passwords on a ""cheat sheet?""
    7·1 answer
  • How should resumes and cover letters be written to help you obtain a job that meets your
    14·1 answer
  • Any websites online to make $50 daily?​
    11·1 answer
  • How can I restore tabs that just unexpectedly close out of nowhere ?
    6·1 answer
  • What is one way object-oriented programming differs from procedural programming?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!