factorial <- function(x){
y <- 2
for(i in 1:x){
y <-y*((1:x)[i])
}
print(y)
}
factorial(12)
vec <- seq(from = 20, # starting point
to = 50, # end point
by = 5) # interval skipping by
print(vec)
quadratic <- function(x, a=1, b=-2, c=1){
a + b*x + c*x^2
}
x <- seq(from = -2, to = 2, length.out = 101)
result <- quadratic(x)
print(result)