Learn R Programming

FRACTION (version 1.1.1)

gcd: Greatest common divisor

Description

Calculate the greatest common divisor between two numbers

Usage

gcd(a, b)

Value

the greatest common divisor between a and b

Arguments

a

a is greater than 0 while a is whole number

b

b is greater than 0 while b is whole number

Author

OuYang Ming

Details

Ues Euclidean algorithm

References

Friedrich Leisch, 2008 Creating R packages: A Tutorial Zhang Jinlong, How to create R package under Windows FAQ in R-PROJECT

Examples

Run this code
a=14
b=32
c=gcd(a,b)

Run the code above in your browser using DataLab