sanjuv 0 Newbie Poster

Given a grid of integers size n x m, (use n=100 and m=4 to test it), write a C program that can create 4 (m) children where each will compute the sum
of row m (size n). Then, the waiting parent, once all children has
computed their respective sums, it will calculate the average of the sums
and display it.

For example:
Consider this grid for 3 children:

1 2 8 2
5 6 4 3
2 3 4 4

you will need 3 children, one for each row.
Sample output:

Child 1 Sum = 13
Child 2 Sum = 18
Child 3 Sum = 13
Parent Average = 14.67

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.