subject

Using the Star structure defined in the file pe07.cpp, write the function named starsBetween(). The function takes three input parameters: a vector of Star as well as a lower and upper bounds for the magnitude. The function selects only the stars whose magnitude falls between the two bounds (exclusive, not inclusive), and adds the names of those stars to the output parameter. The function returns a double representing the average magnitude of the stars selected. If no stars are in the range, then return -1. Here is an example of the function being called. vStars is the input parameter and names is the output parameter. vector names; double avg = starsBetween(vStars, names, 2.3, 2.4);

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:30
What is the primary difference between the header section of a document and the body? a. the body is displayed on the webpage and the header is not. b. the header is displayed on the webpage and the body is not. c. the tag for the body is self-closing, but the tags for the headers must be closed. d. the tag for the header is self closing, but the tag for the body must be closed.
Answers: 3
question
Computers and Technology, 23.06.2019 16:30
Monica and her team have implemented is successfully in an organization. what factor leads to successful is implementation? good between different departments in an organization leads to successful is implementation.
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
How can the temperature of a room be raised by 5degreesf?
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
(, urgent need): how do i change my username
Answers: 1
You know the right answer?
Using the Star structure defined in the file pe07.cpp, write the function named starsBetween(). The...
Questions
question
Chemistry, 15.08.2020 17:01
Questions on the website: 13722362