Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.
What does the output tell about the behavior of the for-loop as well as the distribution of work?
omp_set_num_threads(P);
#pragma omp parallel for private(tid)
for ( i = 1; i <= N; ++i)
{
tid = omp_get_thread_num();
printf("%2d by %3dn", i, tid);
}