Ask Question
17 April, 05:05

Write the definition of a function minmax that has five parameters. the first three parameters are integers. the last two are set by the function to the largest and smallest of the values of the first three parameters. the function does not return a value. the function can be used as follows: int a=31, b=5, c=19 big, small; minmax (a, b, c,& big,& small);

+5
Answers (1)
  1. 17 April, 07:27
    0
    Hello,

    function minmax (int p1, int p2, int p3, int adr_big, int adr_small)

    { int mini=p1, maxi=p1;

    if (p1>p2) {mini=p2; }

    else {maxi=p2; };

    if (p3>maxi) maxi=p3;

    if (p3
    *adr_big=maxi;

    *adr_small=mini;

    };

    / / main

    int a=31, b=5, c=19, big, small;

    minmax (a, b, c,&big,&small);
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Write the definition of a function minmax that has five parameters. the first three parameters are integers. the last two are set by the ...” in 📘 Mathematics if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers