listing01.c

来自「稀疏矩阵、链表、图、队列、二叉树、多叉树、排序、遗传算法等的实现」· C语言 代码 · 共 25 行

C
25
字号
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void)
{
    time_t start, end;

    start = time(NULL);
    if (start == (time_t)-1) {
        printf("Sorry, the time is unavailable on this system\n");
        exit(EXIT_FAILURE);
    }

    printf("Please wait a few seconds and then press your ENTER/RETURN key");
    fflush(stdout);

    getchar();

    end = time(NULL);
    printf("\nThe interval was %.2f seconds\n", difftime(end, start));

    return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?