64,640
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <time.h>
main()
{
clock_t start;
clock_t end;
int i;
int j;
start=clock();
j=0;
for(i=0;i <1000;i++){
j=j+i;
}
delay(2000);
end=clock();
printf( " %x %x ",end , start);
return;
}
#include <time.h>
#include <stdio.h>
#include <dos.h>
int main(void)
{
clock_t start, end;
start = clock();
delay(2000);
end = clock();
printf("The time was: %f\n", (end - start) / CLK_TCK);
return 0;
}