#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>


main()
{
  	pid_t val;

	int cpt1 = 1;
	int cpt2 = 2;

	int i;

	if(val = fork()) //parent because it is the parent who call fork()
	{
		while(cpt1 < 200)
		{	
	    		printf("It is the parent - %d\n",cpt1);
			cpt1 = cpt1 + 2;
			for(i = 0; i < 50000000;i++);
		}
	}
	else //child
	{

		while(cpt2 < 200)
		{	
	    		printf("It is the child - %d\n",cpt2);
			cpt2 = cpt2 + 2;
			for(i = 0; i < 50000000;i++);
		}
	}
	return 0;
}

