Ask Question
Yesterday, 22:18

Write the definition of a function half which recieves a variable containing an integer as a parameter, and returns another variable containing an integer, whose value is closest to half that of the parameter. (Use integer division!)

+1
Answers (1)
  1. Today, 00:07
    0
    int half (int x) {

    int a=x/2;

    return a;

    }

    Explanation:

    function half (x) which has return type integer and accept an integer type parameter 'x' and return the an integer value in variable 'a' which is closest to half that of the parameter 'x'.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write the definition of a function half which recieves a variable containing an integer as a parameter, and returns another variable ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers