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
trasher [3.6K]
3 years ago
7

Write the definition of a function half , which receives an integer parameter and returns an integer that is half the value of t

he parameter. (Use integer division!) So if the parameter's value is 7, the function returns the value 3. If the parameter's value happens to be 44, the functions returns the value 22.
Computers and Technology
1 answer:
timama [110]3 years ago
7 0

Answer:

The answer to this question can be given as:

Function definition:

int half(int value)

  //function name half with an integer parameter

{

return value/2;    //return integer division.

}

Explanation:

In the above function definition, we define a function that is half. This function returns a value that is an integer. In this function, we pass an integer variable that is value. In this function, we return the value of the parameter in the integer division. for example, if the user passes the value 7 in the function parameter so the function will return 3 because we will return an integer value, not floating-point value.

You might be interested in
How is the execution speed of machine language compared to that of high-level languages? The execution speed of machine language
Alik [6]

The execution speed of machine language is faster than the execution speed of other languages. Machine or assembly language will execute the fastest as compared to high-level languages. No other language can execute faster than Machine language since instructions are directed straight to the CPU. Other high-level languages often add some non-zero amount of overhead to the execution time, thus, causing some delay.

7 0
3 years ago
Read 2 more answers
Which of the following is the term for software that automatically displays or downloads unwanted offers?
slega [8]
Adware. Adware displays ads and popups. The other options are completely different from each other
5 0
3 years ago
SOMEONE HELP ME!!!!!
Oliga [24]

Answer:

I don't see the question

Explanation:

5 0
2 years ago
Which type of address is the ip address 232. 111. 255. 250?.
svp [43]
I think it’s a multicast
8 0
2 years ago
Respecting yourself and others, educating yourself and connecting with others, and protecting yourself and others are all aspect
Furkat [3]

Answer:

Digital Citizenship

Explanation: Digital citizenship refers to responsible technology usage, and teaching digital citizenship is essential to helping students achieve and understand digital literacy, as well as ensuring cyberbully prevention, online safety, digital responsibility, and digital health & wellness

5 0
3 years ago
Other questions:
  • Freya realizes she does not have enough in her bank account to use the debit card. She decides to use a credit card instead. Whi
    7·2 answers
  • What are the data types used in C programming with examples
    5·1 answer
  • Ali is in the hospital about to undergo a brain-imaging process that involves taking many x-rays from different angles aided by
    9·1 answer
  • Visual-verbal synergy has nothing to do with text, but solely with images used in a design.
    9·1 answer
  • Diligent people are as concerned with the ____ as the ___ of their work
    12·1 answer
  • WHAT IS A GOOD APP FOR REMOVING VIRUSES AND IT YOU DONT HAVE TO PAY MUCH FOR IT ????? PLEASE HELP ME
    8·2 answers
  • Choose a problem that lends to an implementation that uses dynamic programming. Clearly state the problem and then provide high-
    10·1 answer
  • What are three ways a person may use a computer without realizing it?
    9·1 answer
  • Direction: Write True on the line if the statement is correct. Write False if the statement is incorrect. 1. All objects are com
    13·2 answers
  • What job does a front-end developer perform?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!