Turning Technologies ExamView User Manual

Page 120

Advertising
background image

ExamView Test Generator

120

Syntax

Description

expression MOD

expression

Divides the first expression by the second expression and returns the remainder. If the second expression is equal to zero, the
function will return zero. Integer division may return a negative value to satisfy the identity:

(-A)/B = -(A/B) = A/(-B)

EXAMPLE

-34 MOD 6

will return -4

double mode(list data)

Returns the most common value for the data in the list. If the data is multimodal, this function returns zero.

NO

[Constant] 0.

NOT expression

If expression evaluates to non-zero, this will return FALSE (0), otherwise it will return TRUE (1).

expression OR

expression

Returns TRUE (1) if either expression evaluates to non-zero, otherwise returns FALSE (0). If the first expression evaluates to
TRUE, the second expression is not evaluated.

int perm(int m, int n)

Returns the number of possible permutations. Given that position is important, if one has m objects, how many unique ways can
they be placed in n positions. The actual function is:

PI

[Constant] 3.1415926.... By definition, PI is the ratio of the circumference of a circle to its diameter.

double pow(double x,

double y)

Calculates x to the power of y.

int prime(int x, int y)

Returns a pseudo-random prime number in the range x to y, inclusive.

NOTE

Values must be in the range 2 to 1,000.

turningtechnologies.com/user-guides

Advertising