Page 1 of 1

Write a method sumOfNumbersUpToNExceptMultiplesOfX(int n, int x) that returns the sum of all numbers 1-n including n, ex

Posted: Fri Jul 01, 2022 5:34 am
by answerhappygod
Write a method sumOfNumbersUpToNExceptMultiplesOfX(int n, int x)that returns the sum of all numbers 1-n including n, except if thevalue is a multiple of x ( evenly divisible by x ).