Skip to content

primes_smaller

Vašek edited this page Feb 5, 2019 · 2 revisions

primes_smaller

This function returns a list of lower prime numbers than the given number

Syntax:

primes_smaller(n)
Argument Description
int n The number from you want to get the lower primes

Returns: List<int>

Description:

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.

Example:

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

Clone this wiki locally