added count3 program

This commit is contained in:
Ziad Arafat committed 2021-08-31 10:33:08 -06:00
1 parent 863383e21e
commit f536fbd9e2
1 file changed
+41
+41
View File
@@ -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 <stdlib.h>
#include <time.h>
#include <stdio.h>
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;
}