#R Program to compute the factorial of 12
num = 12 fact = 1
for(i in 1:num) { fact=fact * i } print(paste(“The factorial of”, num, “is”, fact))
#numeric vector sequence of 20 to 50 by 5 vector <- seq(20, 50, by=5) print (vector)
#Create a function named Quadratic that inputs a trio of numbers a,b,c and solves the quadratic equation a=1 b=4 c=3
d = b^2 - 4ac
s1= (-b + sqrt(d))/(2a) s2= (-b - sqrt(d))/(2a)
print(s1) print(s2)