# Exercise 1
x = 1
for (num in c(12:2)){
  x = x * num
} 
x
## [1] 479001600
# Exercise 2
seq(from = 20, to = 50, by = 5)
## [1] 20 25 30 35 40 45 50
# Exercise 3
quadratic.func <- function(a,b,c){
  x_1 = (-b + (b**2 - 4*a*c)**.5) / (2 * a)
  x_2 = (-b - (b**2 - 4*a*c)**.5) / (2 * a)
  print(paste('First factor is:', x_1, 'Second factor is:', x_2))
}
quadratic.func(3,-11,-4)
## [1] "First factor is: 4 Second factor is: -0.333333333333333"