Zadanie na 3 |
| stepniu | 28.01.2012 22:33:58 |
| Grupa: Użytkownik Posty: 7 #852724 Od: 2012-1-26 | #include <stdio.h> #include <unistd.h> #include <pthread.h> void *action() { for (; { printf("."); fflush(stdout); sleep(1); } } main() { void *res; int ile; int i=0; //char s[] = "."; printf("Ile watkow? \n"); scanf("%d",&ile); pthread_t t; for (i=0;i<ile;i++) { pthread_create(&t,NULL, action,NULL); } pthread_join(t,&res); } |
| Aby pisac na forum musisz sie zalogować !!! |