Learn R Programming

exams.forge (version 1.0.10)

lcmval: Least Common Multiple

Description

Computes the least common multiple for a numeric vector x.

Usage

lcmval(x)

lcm_vector(x)

Value

The least common multiple.

Arguments

x

integer: numbers to find the least common multiple

Examples

Run this code
lcmval(c(144, 160))      # = 1440
lcmval(c(144, 160, 175)) # = 50.400

Run the code above in your browser using DataLab