63 800
Assignments Done
99,5%
Successfully Done
In August 2018

Answer to Question #7252 in Other Programming & Computer Science for chris

Question #7252
Write the function product which consumes a list of numbers and returns the product of those numbers. Make sure you follow the design recipe!
Expert's answer
This is example on Java:
int f(LinkedList<Integer> list){
int res = 1;
for(Integer element : list){
res *= element;
}
return res;

}


//...
LinkedList<Integer> l1 = new LinkedList<Integer>();
l1.add(2);
l1.add(3);
l1.add(4);
int product = f(l1);

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions