GCD and LCM of "n" numbers nor 2 numbers

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
First approach
1
2
3
4
5
6
std::accumulate(
  v.begin(),
  v.end(),
  0,
  gcd
);
Topic archived. No new replies allowed.