-
-
Notifications
You must be signed in to change notification settings - Fork 18
primes_smaller
Vašek edited this page Feb 5, 2019
·
2 revisions
This function returns a list of lower prime numbers than the given number
primes_smaller(n)
Argument | Description |
---|---|
int n |
The number from you want to get the lower primes |
Returns: List<int>
A prime number is a number that is divisible only by itself and 1 (e.g. 2, 3, 5, 7, 11). This function returns all lower prime numbers in a list.
var numbers = new List<int>();
numbers = primes_smaller(10);
This function will set 4 values in the list numbers
- 2, 3, 5 and 7.
Back to number_functions