algo093b.zip
| FREE |
|
Description by Publisher
provides a handful of mathematical algorithms in C. The library is
tested with DJGPP v2 C-compiler although it should work on any other
system.
Short description:
- int am_sumdigits(int n); return the sum of the digits of the number n
int.
- am_sumdigitsalt(int n); return the alternating sum of the digits of
the number n.
- int am_rotate(int n, int x); rotate the digits of a number n, x times,
in base 10.
- int am_sumdivisors(int n); return the sum of all possible divisors of
the number n, n not included
- int am_sortdigits(int n); sort the digits of a number n
- int am_primetest(int n); return 1 if n is prime else -1
- int am_gcd(int a, int b); return the 'greatest common divisor' of two
numbers a and b
- void am_primearray (int p, n, int* Array ); store prime numbers to an
array
- void am_factorize(int n, int* Array); factorize a number n and stores
its factors in array[]
- int am_goldbach(int a,int *p); calculate the Goldbach Conjecture
Special requirements: None.
algo093b.zip has replaced algo09b.zip.
Freeware. Uploaded by the author.
Armand Turpel
armandt@unforgettable.com
dragon@programmer.net
------------------------------