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
Evgesh-ka [11]
3 years ago
11

Your friend is working on a Lab experiment to decide which insect is the fastest. You will help your friend and write an algorit

hm and a C++ program that allows your friend to enter the names of the insects and the measured speed of each insect. The names of the insects and the measured speeds should be stored in two arrays. The program should then sort and print the insects in descending order based on their speed. Your program should also output the name of the fastest insect.
Computers and Technology
1 answer:
7nadin3 [17]3 years ago
3 0

Answer:

#include <iostream>

#include <string>

using namespace std;

int main()

{

    int size=100;

   float insect_speed [size];

   string insect_name [100]={""};

int max=0;

int max_index=0;

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

   

   cout<<"insect speed"<<endl;

cin>>insect_speed[i];

cin.ignore();

   cout<<"insect name"<<endl;

   getline(cin,insect_name[i]);

if(insect_speed[i]>max){

   max=insect_speed[i];

   max_index=i;

}

   cout<<"Fastest insect is "<<insect_name[max_index]<<" with speed "<<insect_speed[max_index]<<endl;

}

   return 0;

}

Explanation:

Initially took max size of 100. Using string define an string array of size for insect name and float array of size for speeds.

Define a variable max and set to 0 and a max_index and set to 0. max index will store the index of maximum value in array of speed.

For every input of speed check if it greater than max set max to current input vale of speed and max_index to current index of array.

print speed and insect name at max_index for fastest insect.

System will calculate fastest insect at run time an update user after every input.

You might be interested in
Excel solver is the only method that one can utilize for automated linear programming solutions. True or False
klasskru [66]

Answer:

False

Explanation:

This is not true at all. This can be done with a wide variety of resources in the modern world. There is the CPLEX (IBM ILOG CPLEX Optimization Studio) software, which was developed by Robert E. Bixby in 1988, it passed to several other companies and it was later sold to IBM in January 2009. Today it's one of the world's most effective programs when it comes to automated linear programming solutions.

3 0
3 years ago
Company A’s IT department has a hosting platform specifically for systems used by the company’s large marketing department. This
agasfer [191]

Answer:

cloud has the On demand and ubiquitous access characteristics

Explanation:

The specific characteristics of cloud that would be helpful for his problem to be addressed is the fact that cloud offers on demand usage and ubiquitous access.

What is meant by on demand access is that the cloud customer can pay for cloud services and use them whenever they are needed. As long as the cloud service is authorized.  

By Ubiquitous access it means that the cloud customer has reliable access without the presence of any form of disturbances or issues and it can be accessed from anywhere. Different range of devices are supported on the cloud platform and with the presence of internet lots of services can be accessed.

Based on the issues being faced by customers, this characteristics of cloud will be useful to address the problems.

6 0
3 years ago
Instrument Air system that employ a standby header shall be permitted to have a simplex cooler and dryer. Where a standby header
Vinil7 [7]

The standby header is provide a check valve shall be installed to prevent backflow.

<h3>What is instrument air?</h3>

The phrase “Instrument Air” is a term that connote  a thoroughly clean supply of compressed air that is said to be very free from any kind of contaminations such as particles.

Note that a system often utilize instrument air for different kinds of pneumatic tools, also that of valves and electrical controls.

See full question below

Instrument Air system that employ a standby header shall be permitted to have a simplex cooler and dryer. Where a standby header is provided, a ___________ shall be installed to prevent backflow.

answer choices

one way valve

two way check valve

check valve

Isolation valve

Learn more about Instrument from

brainly.com/question/26219918

7 0
2 years ago
Table Setting in any occasion can add to the beauty and significance of the event. It may
Rudiy27

Answer:

HMMMM IM THINKING HMMMMM

Explanation:

7 0
3 years ago
Why did England establish the Sugar Act?
Iteru [2.4K]

Answer:

The Revenue Act of 1764, also known as the Sugar Act, was the first tax on the American colonies imposed by the British Parliament. Its purpose was to raise revenue through the colonial customs service and to give customs agents more power and latitude with respect to executing seizures and enforcing customs law.

Explanation:

Hope this helps- Good luck ^w

4 0
3 years ago
Other questions:
  • A user is claiming a host can be reached via the IP address but not through the name. What should a technician do first to resol
    13·1 answer
  • A director notices that one of his camera operators is carrying an accessory without packing it properly in a bag to avoid hurti
    10·1 answer
  • In Google search results, how are organic links different from sponsored links?
    13·2 answers
  • What are the principles for computer programming?<br> Please add some examples
    8·1 answer
  • The Beaufort Wind Scale is used to characterize the strength of winds. The scale uses integer values and goes from a force of 0,
    10·1 answer
  • Refer to the exhibit. All workstations are configured correctly in VLAN 20. Workstations that are connected to switch SW1 are no
    14·1 answer
  • . Which one of the following is not a JAD participant? 1. Managers 2. System analyst 3. Business development manager 4. Users
    7·1 answer
  • Match the vocabulary word to the accurate definition. A software program that enables you to search for, interact with, and retr
    5·2 answers
  • Through the use of computational thinking techniques, models and algorithms can be created. A(n) ___1___ can be created that rep
    12·2 answers
  • Which type of relationship is responsible for teaching you values and how to communicate?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!