Answer:
Solution code is written in Java.
- public static void main(String[] args) {
- int eurasiaSales = Add(10000, 20000);
- }
-
- public static int Add(int euroSales, int asiaSales){
- return euroSales + asiaSales;
- }
Step-by-step explanation:
Firstly, create a function Add() that takes two int parameters, euroSales and asiaSales. This function return the sum of euroSales and asiaSales (Line 5-6).
Next, we can simply call the function by passing two integers (place them in parenthesis). The returned value from the function will be assigned to variable eurasiaSales.