exr10_9.c

来自「Software Development in C: A Practical A」· C语言 代码 · 共 46 行

C
46
字号
//-----------------------------------------------
// Include Files
//-----------------------------------------------

#include <stdio.h>
#include <stdlib.h>

//End Include Files------------------------------



//-----------------------------------------------
// Constants
//-----------------------------------------------

const int ARRAY_LENGTH = 100;

//End Constants----------------------------------



int main()
{
	int i, integerArray[ARRAY_LENGTH];
	int currentMax;

	// Fill the array with random integers.
	// For each array element...
	for (i=0;i<ARRAY_LENGTH;i++)
	{
		/* Generate a random integer and store
		it in the array. */
		integerArray[i]=rand();
	}

	currentMax=0;

	// For each array element...
		/* If the array element is greater than 
		the current maximum... */
			/* Set the current maximum to the 
			value in the array element. */

	return (0);
}

⌨️ 快捷键说明

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