Project Euler-Ibadan Version

Project Euler-Ibadan Version
0

https://learn.freecodecamp.org/coding-interview-prep/project-euler

Let’s prepare for your next JOB interview together. By solving JavaScript Algoritms together.

READ THIS: Porting Project Euler to freeCodeCamp

https://learn.freecodecamp.org/coding-interview-prep/project-euler/problem-1-multiples-of-3-and-5/

function multiplesOf3and5(number) {
  // Good luck!
 let sum = 0;
  while (number >= 0){
    if (number%3==0 ||number%5==0){
      sum +=number;
          }
      number--;
  }
  return sum;
}

that works well for all others except for 1000. I guess my sum should not have included 1000 itself.

2 Likes

https://learn.freecodecamp.org/coding-interview-prep/project-euler/problem-2-even-fibonacci-numbers

function fiboEvenSum(n) {
  // You can do it!
  return true;
}

fiboEvenSum(10);

1 Like

1 Like