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
beks73 [17]
3 years ago
6

The following statement calls a function named half. The half function returns a value that is half that of the argument. Write

the function.
double half (double& number)
{
double half, number;
half = number / 2;
return half;
}
Computers and Technology
1 answer:
Olenka [21]3 years ago
6 0

Answer:

double half (double number)    //to pass by reference is not important here

{

double half;          //number again should not be declared here

half = number / 2;        

return half;

}

int main()

{

    cout<<half(50);

}

Output :

25

Explanation:

As not mentioned in the question, any data type could have been used like int , float or double. Method half() takes a double variable as parameter which is passed as value as we don't need to make the change at the same address we need value of that argument only. A variable half of double type is declared which will hold the half value. Number is not required to declared again here as it is passed by argument. Then the number is divided by 2 and half is returned.

You might be interested in
The CSS property of top , bottom , left , or right moves the element the specified distance from the respective edge of the clos
borishaifa [10]

Answer:

Relative

Explanation:

Web development is a process of designing and building a web page or website. HTML, CSS and JavaScript are the basic tools used in building a website.

Cascading style sheet or CSS is a web development tool used to style the content of a HTML file. Css has pointers used to represent HTML elements for styling. A HTML element can be fixed, absolute or relative.

When a CSS file sets an element relative to it container or other element, the element can be moved to the right, left, top or bottom position relative to the four corners of the parent element.

7 0
3 years ago
My name Jeff <br><br> what movie is this off of
Zielflug [23.3K]

Answer:

there is no movie name off of

4 0
3 years ago
Read 2 more answers
You have a Bluetooth headset that integrates with your computer so that you can talk to partners through Microsoft Lync. This is
otez555 [7]
I believe this is an example of a Wireless Personal Area Network (WPAN). This type of network provides a low range wireless network that can interconnect devices near each other. So, Bluetooth devices such as a Bluetooth headset would be an example of WPAN.
5 0
3 years ago
Read 2 more answers
You run an automobile selling company that has a popular online store on AWS. The application sits behind an Auto Scaling group
vredina [299]

Answer:

We can achieve this by using cURL command and GET command.

Explanation:

<u>cURL command: </u>

  • cURL command is the command of the command line tools which are available on the following platforms such as Linux, Windows, Mac OS, and many other Operating Systems.
  • From the servers, cURL transfer the following data by using any of the protocol which are supported such as SFTP, HTTPS, HTTP, FTPS or many of the other protocols.

<u> </u>

<u>GET command: </u>

GET command is the function by which from the particular URL we can retrieve the resources.

8 0
3 years ago
A ___________ is the smallest unit in a written language.
Delvig [45]
A. string? maybee its a string of units


8 0
4 years ago
Read 2 more answers
Other questions:
  • The North American Free Trade Agreement (NAFTA) among Canada, Mexico, and the United States is intended to _____.
    5·2 answers
  • Software that was designed to serve the needs of a specific company or organization is called:
    5·1 answer
  • The part of the computer that provides access to the internet is the?
    14·1 answer
  • Anna is making a presentation on the solar system. She wants to emphasize the planet names as they appear one by one on the pres
    11·1 answer
  • during zach's second visit of the year, he incurred a $450 bill. Describe how much is paid by Zach and the insurance carrier
    7·1 answer
  • PLEASE  HELPPPP!!!!!
    14·1 answer
  • What group in the review tab contains the commands and to accept or reject changes made to a document
    14·2 answers
  • 11.The shortcut keys used to center a paragraph are&lt;br /&gt;a. CTRL+T&lt;br /&gt;b. CTRL+M&lt;br /&gt;c. CTRL+SHIFT+T d. CTRL
    7·1 answer
  • Write a function called has_duplicates that takes a string parameter and returns True if the string has any repeated characters.
    7·1 answer
  • What was that show where lowe’s were based off eye colors and the main character had orange eyes that let her mind control peopl
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!