36.1k views
0 votes
add is a function that accepts two int parameters and returns their sum. Two int variables, euroSales and asiaSales, have already been declared and initialized. Another int variable, eurasiaSales, has already been declared. Write a statement that calls add to compute the sum of euroSales and asiaSales and store this value in eurasiaSales.

1 Answer

2 votes

Answer:

The answer to this question can be given as:

Statement:

eurasiaSales = add(euroSales, asiaSales);

//calling function and value in variable (eurasiaSales)

Explanation:

In the above statement, we assume that there is an add function that is already declared. In this function, two variable is passed as the parameter, we add two numbers and return its value. Then we declare the main function in the main function we declare a variable that is (eurasiaSales). This variable holds the value of the add function when we call the function.

User Andrew Bennett
by
5.0k points