About 11,900,000 results
Open links in new tab
  1. Sum of all prime numbers in an Array - GeeksforGeeks

    Aug 4, 2023 · Given an array of integers (less than 10^6), the task is to find the sum of all the prime numbers which appear after every (k-1) prime number i.e. every K'th prime number in …

  2. java - find all prime numbers from array - Stack Overflow

    Mar 30, 2022 · So I solved it by System.out.println(array[i] + " are the prime numbers in the array "); giving me the ouput: 23 are the prime numbers in the array 101 are the prime numbers in …

  3. Java Program to find the sum of prime numbers in an array - Xiith

    In this program, You will learn how to find the sum of prime numbers in an array in java. Some list of prime numbers is: 2 3 5 7 9 11 13 Example: How to find sum of prime numbers in an array …

  4. Java Program to find Sum of Prime Numbers - Tutorial Gateway

    Program to find Sum of Prime Numbers using Method. This Java program accepts the Minimum and maximum values from the user. Next, it finds the sum of all prime numbers between the …

  5. Sum of Prime Numbers in Java - Tpoint Tech

    Update the number [] array that holds the sum of prime numbers. Each position of number [i] represents the sum of all prime numbers within a specified range i.e. [1, i]. Let's implement the …

  6. Sum of n prime numbers in Java - Stack Overflow

    First of all, you should write a method check the number is prime or not. After that, use loop statement to get first count prime. Then only sum that. Hope it will help you. int count = 3; int …

  7. How do you find the sum of all the numbers in an array in Java?

    Dec 29, 2010 · There is absolutely no better way to determine the sum of a set of arbitrary numbers than by adding up all the numbers. O (n) is the best you can do.

  8. Minimum and Maximum prime numbers in an array

    Feb 5, 2024 · Given an array arr[] of N elements. The task is to find the maximum number of the contiguous prime numbers in the given array. Examples: Input: arr[] = {3, 5, 2, 66, 7, 11, 8} …

  9. Multithreaded Java Program: Sum of Prime Numbers - w3resource

    May 9, 2025 · Write a Java program to implement a multithreaded prime sum calculation using the Sieve of Eratosthenes distributed across threads. Write a Java program to use a thread …

  10. Sum of all the prime numbers in a given range - GeeksforGeeks

    Mar 18, 2025 · Given an array of integers (less than 10^6), the task is to find the sum of all the prime numbers which appear after every (k-1) prime number i.e. every K'th prime number in …

  11. Some results have been removed
Refresh