コードの実行時間をテスト

1644 ワード

CODE:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main()
{
    int time;
    printf("Input how much times that you wanna run this progrma?

time =
"); scanf("%d", &time); int i = 0; long start, end; start = clock(); while (time--) ++i; end = clock(); printf("time = %ld (ms)
", end - start); return 0; }