15,471
社区成员
发帖
与我相关
我的任务
分享
#include "stdafx.h"
#include <Windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
unsigned long ticks1,ticks2;
ticks1 = GetTickCount();
unsigned long a=1;
for (int i = 1; i < 500000; i++)
{
for (int i = 1; i < 5000; i++)
{
a=1;
a=a*i;
}
}
printf("%d\n",a);
ticks2 = GetTickCount();
ticks1=ticks2-ticks1;
printf("程序经过毫秒数:%d",ticks1);
getchar();
return 0;
}