From f536fbd9e2cad4fb8d2717bcef2df34d7a700d34 Mon Sep 17 00:00:00 2001 From: Ziad Arafat Date: Tue, 31 Aug 2021 10:33:08 -0600 Subject: [PATCH] added count3 program --- count3.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 count3.c diff --git a/count3.c b/count3.c new file mode 100644 index 0000000..01370b3 --- /dev/null +++ b/count3.c @@ -0,0 +1,41 @@ +/* +Ziad Arafat +08/26/2021 + +- Created file + +This file will fill an array with random numbers between 0 and 3 inclusive. +It will then use a serial function to count the number of 3s in the function. +After that we will begin to implement the parallel version. + + + +*/ + +#include +#include +#include + +struct rand_three { + int array[20]; +} + + +struct rand_three rand_arr(struct rand_three my_arr) { + struct rand_three x = my_arr; + for (int i = 0; i < 20; i++) + { + rand_three->array[i] = + } + +} + +int main(int argc, char const *argv[]) +{ + srand(time(0)); + // Create an empty array + // set it equal to rand_arr(my_arr) + // set count to count_3_serial() + // print the result + return 0; +}