Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void PROC_A(int nr_procesu)
- {
- int A;
- A = random();
- send A to P(0);
- }
- void PROC_B(void)
- {
- int B;
- B = random();
- for (int i = 0; i < N; i++)
- {
- receive A from P(i);
- if (A > B)
- printf("Proces: %d", i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement