Algorithms_in_C 1.0.0
Set of algorithms implemented in C.
|
Problem 10 solution More...
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
Functions | |
char | is_prime (unsigned long n) |
Function to check if a number is prime. | |
unsigned long long | sum_of_primes (unsigned long N) |
Computes sum of prime numbers less than N. | |
int | main (int argc, char *argv[]) |
Main function. | |
Problem 10 solution
char is_prime | ( | unsigned long | n | ) |
Function to check if a number is prime.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main function.
unsigned long long sum_of_primes | ( | unsigned long | N | ) |
Computes sum of prime numbers less than N.