Write a R program that include different operators, control structures, default values for arguments, returning complex objects.

a. operators
vec1 <- c(0, 2)
vec2 <- c(2, 3)
cat ("Addition of vectors:", vec1 + vec2, "\n")
cat ("Subtraction of vectors:", vec1 - vec2, "\n")
cat ("Multiplication of vectors:", vec1 * vec2, "\n")
cat ("Division of vectors:", vec1 / vec2, "\n")
cat ("Modulo of vectors:", vec1 %% vec2, "\n")
cat ("Power operator:", veel vec2)

b. control structures
x <-5
if(x > 10){
print(paste(x, "is greater than 10"))
}else{
print(paste(x, "is less than 10"))
}

c.default values for arguments
divisible <- function(a, b = 3) {
if(a %% b == 0)
{
return(paste(a, "is divisible by", b))
else
return(paste(a, "is not divisible by", b))
}
}
print(divisible(10, 5))
print(divisible(12))

d. returning complex objects:
multi_return<- function() {
my_list<-list("color" = "red", "size" = 20, "shape" = "round")
return(my_list)
}
a <- multi_return()
print(aScolor)
print(aSsize)
print(a$shape)