#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);
}
#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);
}