#include <stdio.h>
#include <stdlib.h> //用于随机数函数, rand()与srand()
#include <time.h> //用于time()函数
int main()
{
long sum = 0;
char ch;
sum = time(NULL); //这里的time()函数, 要固定地给一个参数NULL,否则会出错
printf("sum = %d\n", sum); //返回的是秒数
while((ch = getchar()) != '\n')
continue; //用来暂停屏幕
return 0;
}