Question
Write a Perl program that will do the following: It will accept three comm and-line arguments: (1) The first will be a beginning number for
Write a Perl program that will do the following:
It will accept three command-line arguments:
For example, if the call to the program wasmark-a11.pl 100 1000 200
The program should create four child processes. Each process should generate 200 random numbers between 100 and 1000.
After the parent process creates the child processes, it should wait so that the child processes can finish. The child processes should send the sum of its generated numbers to the parent using a pipe. The parent should compute the global mean of all the data (rounded to the nearest tenth) and send that mean back to each of the four child processes using the pipe. Each child process will display a single line (shown at bottom of report) summarizing its statistics.
The parent process should generate a report heading (to the screen). The entire output looks like this:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started