// bsp4a.cpp : main project file.
#include "stdafx.h"
#include <omp.h>

using namespace System;

int main(array<System::String ^> ^args)  {
	omp_set_num_threads(4);
	int sum=0;
	int j;

	#pragma omp parallel for private(j) shared(sum)
		for (int i = 0; i < 10000000; ++i) {
			//j=sum;
			sum+=1; //j + i+1;
		}
	
	Console::WriteLine("Summe: {0}  ", sum );

	Console::ReadLine();	

	return 0;
}
