Ask Question
20 December, 17:13

max is a function that accepts two int parameters and returns the value of the larger one. Two int variables, population1 and population2, have already been declared and initialized. Write an expression (not a statement!) whose value is the larger of population1 and population2 by calling max.

+4
Answers (1)
  1. 20 December, 17:15
    0
    Value=max (populatio1, population2)

    Step-by-step explanation:

    Assuming that two int variables, population1 and population2, have already been declared and initialized, we car write the next function:

    max (population1, population2)

    if population1 = > population2

    then var=population1

    else var=population2

    endif

    return var

    This function decides between two values population1 and population 2 and return the value of the larger one.

    Note that we can have the option where population1 and population 2 are equal and doesn't matter if we choose population1 or population2
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “max is a function that accepts two int parameters and returns the value of the larger one. Two int variables, population1 and population2, ...” in 📗 Mathematics if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers