// bsp3a.cpp : main project file.

#include "stdafx.h"

#include <math.h>

#ifdef _OPENMP
  #include <omp.h>
#endif



int _tmain(int argc, _TCHAR* argv[])
{
	printf("Beim Start Max Threads: %d   Anz CPU %d\n",
	 	omp_get_max_threads(),    omp_get_num_procs() );

	int n = 10;  // (int) rand()/100;
	omp_set_num_threads(n);

	printf("Max Threads gesetzt: %d   Anz CPU %d\n",
	 	omp_get_max_threads(),    omp_get_num_procs() );

	#pragma omp parallel for 
		for (int i = 0; i < 10; ++i)	
		{
			int id = omp_get_thread_num();
			printf("Thread %d  lokales i: %d\n", id, i );
		}

	char ch[200];
	gets(ch);
	

	return 0;
}

