Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sys/wait.h>
- #include <assert.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <math.h>
- #include <pthread.h>
- #include <stdlib.h>
- #include <time.h>
- #define ODCZYT 0
- #define ZAPIS 1
- int pierwsza(int x)
- {
- int i=0;
- int pierwsza=0;
- if(x==1)
- return 0;
- for(i=2; i<=sqrt(x); i++)
- {
- if(x%i == 0)
- {
- pierwsza=1;
- break;
- }
- }
- return pierwsza;
- }
- int main()
- {
- int bogdan[2];
- int szatan[2];
- int pipe(bogdan);
- int pipe(szatan);
- if(fork())
- {
- write(bogdan
- }
- else
- {}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement