Skip to content

Commit

Permalink
Fix smuos#5: Parent print mean()
Browse files Browse the repository at this point in the history
  • Loading branch information
zekewang918 committed Sep 27, 2014
1 parent e479d5f commit e5e67eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Binary file modified mm
Binary file not shown.
6 changes: 3 additions & 3 deletions mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ int main(int argc, char *argv[]) {
fprintf(stdout, "The median is: %f", median(pt, length));
// If the process is parent
} else if (rc > 0){
fprintf(stdout, "This is parent prcesss(pid:%d)", (int)getpid());
fprintf(stdout, "The mean is: %f", mean(pt, length));
fprintf(stdout, "\n%s: FIN. \n",argv[0]);
fprintf(stdout, "\nThis is parent prcesss(pid:%d)\n", (int)getpid());
fprintf(stdout, "The mean is: %f\n", mean(pt, length));
fprintf(stdout, "%s: FIN. \n",argv[0]);
}

return 0;
Expand Down
8 changes: 3 additions & 5 deletions mm.c~
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,10 @@ int main(int argc, char *argv[]) {
fprintf(stdout, "The median is: %f", median(pt, length));
// If the process is parent
} else if (rc > 0){
fprintf(stdout, "This is parent prcesss(pid:%d)", (int)getpid());
fprintf(stdout, "The mean is: %f", mean(pt, length));
fprintf(stdout, "\nThis is parent prcesss(pid:%d)\n", (int)getpid());
fprintf(stdout, "The mean is: %f\n", mean(pt, length));
fprintf(stdout, "\n%s: FIN. \n",argv[0]);
}

// Print FIN
fprintf(stdout, "\n%s: FIN. \n", argv[0]);

return 0;

Expand Down

0 comments on commit e5e67eb

Please sign in to comment.