Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- volume <- function(L,B,H){
- vol <- L*B*H
- return(vol)
- }
- volume(7,8,9)
- volume <- function(x) {
- x <- c(L,B,H) #This is incorrect
- vol <- L*B*H
- return(vol)
- }
- L <- 7
- B <- 8
- D <- 1
- volume(x)
- volume <- function(x){
- return(prod(x))
- }
- L <- 7
- B <- 8
- D <- 1
- x <- c(L, B, D)
- volume(x)
- [1] 56
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement