From fe204db23cb8afe7250e9b8c2cd8d39e19602857 Mon Sep 17 00:00:00 2001 From: kevin Date: Sun, 17 Mar 2019 22:29:50 -0400 Subject: [PATCH] Add solution for 357 --- problem-357.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 problem-357.c diff --git a/problem-357.c b/problem-357.c new file mode 100644 index 0000000..a12af2e --- /dev/null +++ b/problem-357.c @@ -0,0 +1,45 @@ +#include +#include +#include +#include "primes.h" + +#define MAX_NUM 100000000 +#define TRUE 1 +#define FALSE 0 + +int main(int argc, char **argv) +{ + int i, j, match, midpoint; + long sum = 0; + char *primes; + + primes = malloc((MAX_NUM+1)*sizeof(char)); + for (i=1; i