Learn R Programming

blocksdesign (version 3.6)

HCF: Find hcf

Description

Finds the highest common factor (hcf) of a set of integer numbers greater than zero (Euclidean algorithm)

Usage

HCF(v)

Arguments

v

is the vector of integers for which the hcf is required (must be integers)

Value

hcf

Details

Finds the hcf of a vector of positive integers which can be in any order

Examples

Run this code
# NOT RUN {
# hcf of vectors of integers
HCF(c(56,77,616))
HCF(c(3,56,77,616))  

# }

Run the code above in your browser using DataLab