📄 randtest.c
字号:
/* * File: randtest.c * ---------------- * This program tests the ANSI rand function. */#include <stdio.h>#include <stdlib.h>#include "genlib.h"/* * Constants * --------- * NTrials -- Number of trials */#define NTrials 10/* Main program */main(){ int i, r; printf("On this computer, RAND_MAX = %d.\n", RAND_MAX); printf("Here are the results of %d calls to rand:\n", NTrials); for (i = 0; i < NTrials; i++) { r = rand(); printf("%10d\n", r); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -