Introductionīefore starting with the algorithm where we shall understand how to find the sum of all prime numbers between 1 to n, we should first briefly understand what prime numbers are.Ī prime number can be defined as a positive integer greater than 1 and only divisible by two numbers, 1 and itself. Some prime numbers include 2, 3, 5, 7, 11, 13, etc.Īnd the sum of prime numbers denotes the summation of all the prime numbers less than or equal to the given input. In other words, prime numbers are positive integers greater than 1 with exactly two factors, one and the number itself. Prime numbers are natural numbers that are divisible by only one and the number itself.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |