Question: Write a C program that creates the necessary child ( ren ) process ( es ) as per the figure. Let the parent to read

Write a C program that creates the necessary child(ren) process(es) as per the figure. Let the parent to read
the major id from keyboard and send it via pipe.
The calculation on a child side will be based on the following table:
When receiving the calculation result from the child process, the parent should display the total
amount to be paid beside your name. If the major was not listed in the table, the parent should
display "Sorry, your major is not correct".
Note: Provide a screenshot of your output.
At the end of the code (parent side), display your LIU name and id
Sample Run1:
Output
Enter a major id (1,2,3):1
total to be paid:12375 $
LIU Ahmad Masri 51231245
Sample run2:
Output
Enter a major id (1,2,3):3
total to be paid:23750 $
LIU Ahmad Masri 51231245
Sample run3:
Output
Enter a major id (1,2,3):9
error, enter 1,2 or 3
LIU Ahmad Masri 51231245
Note: Provide a screenshot of your output.
At the end of the code (parent side), display your LIU name and id
THIS IS FOR THE SOLUTION NAME AND ID:
MY NAME IS :ANHAL BADRAN
ID:12110812
Write a C program that creates the necessary

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!