GCD and LCM of "n" numbers nor 2 numbers

Sep 30, 2011 at 8:23pm
i need program that can find GCD and another one for to find LCM of "n"numbers not 2 numbers thank you for trying answering
Last edited on Sep 30, 2011 at 8:24pm
Sep 30, 2011 at 9:09pm
First approach
1
2
3
4
5
6
std::accumulate(
  v.begin(),
  v.end(),
  0,
  gcd
);
Topic archived. No new replies allowed.