Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: CrxC01
  • Content: Threads
  • Order by date
  1. CrxC01

    Sum of All Primes

    function sumPrimes(num) { // Helper function to check primality function isPrime(num) { for (let i = 2; i <= Math.sqrt(num); i++) { if (num % i == 0) return false; } return true; } // Check all numbers for primality let sum = 0; for (let i = 2; i <= num...
  2. CrxC01

    Sum of all primes numbers

    hello, Can someone help me please with this algorithm? my example is 10. (A prime number is a whole number greater than 1 with exactly two divisors: 1 and itself. For example, 2 is a prime number because it is only divisible by 1 and 2. In contrast, 4 is not prime since it is divisible by 1, 2...

Part and Inventory Search

Back
Top