⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 randtest.c

📁 c语言开发方面的经典问题,包括源代码.c语言开发所要注意的问题,以及在嵌入式等各方面的应用
💻 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 + -