// Perfect.cpp : Defines the entry point for the console application. #include "stdafx.h" #include "Windows.h" #include "LIMITS.h" static HANDLE Thread_semaphore; int _tmain(int argc, _TCHAR* argv[]) { HANDLE hThread1; DWORD dwThread1ID = 0; HANDLE hThread2; DWORD dwThread2ID = 0; HANDLE hThread3; DWORD dwThread3ID = 0; HANDLE hThread4; DWORD dwThread4ID = 0; INT nParameter = 1; DWORD WINAPI PerfectThread (LPVOID lpArg); DWORD time_count; unsigned long i, j, sum; printf("\n"); time_count = GetTickCount(); for (j=2; j<=100000; j++) { sum = 0; for (i=1; i