a-conjecture-of-mine

An exercise on polyglossy: the same problem solved on multiple languages

Commit
fbed5358ac751f679fafc0bfec4939d1deb09cce
Parent
c328aadfa7925d1325999743f287a24f7f827354
Author
Gark Garcia <37553739+GarkGarcia@users.noreply.github.com>
Date

Fixed minor errors in the C implementation.

Diffstat

2 files changed, 4 insertions, 4 deletions

Status File Name N° Changes Insertions Deletions
Modified C/main.c 6 3 3
Modified README.md 2 1 1
diff --git a/C/main.c b/C/main.c
@@ -101,11 +101,11 @@ int main()
     printf("\nThis program is a simple test for the following conjecture:\n");
     printf("Let S: N -> N be the sum of the digits of a positive integer.\n");
     printf("For all A and B in N, S(A + B) = S(A) + S(B) - 9k, where k is an integer.\n");
-    printf("\nWhat value would you like to test the conjecture for? >");
+    printf("\nWhat value would you like to test the conjecture for? ");
 
     scanf_s("%u", &MAX);
 
-    printf("\nLOADING. . ");
+    printf("\nLOADING. . .");
     clock_t start = clock(), end;
 
     // Create the sums cache
@@ -123,7 +123,7 @@ int main()
         thread_iters[i].start = i;
         thread_iters[i].max = MAX;
         thread_iters[i].interval = num_threads;
-        err = pthread_create(&thread_ids[i], NULL, get_counter_example_iter, &thread_iters[i]);
+        err = pthread_create(&thread_ids[i], NULL, get_counterexpl_iter, &thread_iters[i]);
         
         if (err) printf("Unable to create thread : %d", err);
     }
diff --git a/README.md b/README.md
@@ -19,9 +19,9 @@ The conjecture was [proved by exhaustion](https://en.wikipedia.org/wiki/Proof_by
 |Language      |Milliseconds|
 |--------------|------------|
 |**Rust**      |103         |
+|**C**         |113         | 
 |**Kotlin**    |137         |
 |**Go**        |155         |
-|**C**         |271         | 
 |**JavaScript**|656         |
 |**Ruby**      |9850        |
 |**Python**    |16032       |