Question 1

v <- seq(12, 1, -1)
q <- 1

for(i in v) {
    q <- i * q
  }
print(q)
## [1] 479001600

Question 2

q2 <- seq(from = 20, to = 50, by = 5)

print(q2)
## [1] 20 25 30 35 40 45 50

Question 3

factorial <- function(a,b,c){
  

  x1 <- (-1*b + sqrt(b^2 - 4*a*c))/2*a
  x2 <- (-1*b - sqrt(b^2 - 4*a*c))/2*a


print(paste("X1 = ",x1))
print(paste("X2 = ",x2))
}

factorial(10,100,50)
## [1] "X1 =  -52.786404500042"
## [1] "X2 =  -947.213595499958"