Learn R Programming

Tex4exams (version 0.1.2)

hypotex: TeX code of the hypotenuse

Description

Given the lengths of the integer legs of a right triangle, the function generates the TeX code of the length of the hypotenuse in simplified form.

Usage

hypotex(a,b)

Value

The function generates the TeX code of the hypotenuse in simplified form of the radicals.

Arguments

a,b

a pair of the integer leg lengths of a right triangle.

See Also

simpRad, sintex, costex

Examples

Run this code
a <- sample(c(1:5),1)
b <- sample(c(1:5),1)
hypotex(a,b)

Run the code above in your browser using DataLab