To implement a Simple Calculator using R programming.
# Create functions for all simple arithmetic operations
add return(x+y)
}
sub return(x-y)
}
mult return(x*y)
}
div return(x/y)
}
mod return(x%%y)
}
#User Input
cat(“Select Operation :\n1) Addition\n2) Subtraction\n3) Multiplication\n4) Division\n5) Modulo Division”)
choice n1 n2
#Switch Statement
result
#Result
cat(“Result : “,result)