diff --git a/mm.c b/mm.c index 603cd2a..f847e45 100644 --- a/mm.c +++ b/mm.c @@ -1,5 +1,6 @@ #include #include +#include #define debug 0 @@ -60,18 +61,25 @@ int main(int argc, char *argv[]) { qsort(pt, length, sizeof(int), numcmp); // Print out numbers - fprintf(stdout, "%s: Sorted output is: \n", argv[0]); + fprintf(stdout, "%s:(%d) Sorted output is: \n", argv[0], getpid()); for (i=0; i 0) { + // Parent Print Mean + float calculatedMean = mean(pt, length); + fprintf(stdout, "\n%s:(%d P) Mean is: %.3f", argv[0], getpid(), calculatedMean); + } fprintf(stdout, "\n%s: FIN. \n", argv[0]);