Use R calculate the following
a <- 2
b <- 53
c <- 981
d <- 21
result <- a*b*c*d
print(result)
## [1] 2183706
2 * 53 * 981 * 21
## [1] 2183706
a <- 95
b <- 8734
resulta <- a * b
c <- 47
resultb <- resulta / 47
print(resultb)
## [1] 17653.83
(95*8734)/47
## [1] 17653.83
a <- 2
b <- 12
resulta <- a ^ b
print(resulta)
## [1] 4096
2^12
## [1] 4096
x = 2
y = 6
z = 2 + 8
print(z)
## [1] 10
list 1 -> 100 every 3s
a = 1
b = 100
threes = 3
seq(a, b, +3)
## [1] 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55
## [20] 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100
print("enter weight in kg and hieght in meters")
## [1] "enter weight in kg and hieght in meters"
height = readline(prompt = "enter height: ")
## enter height:
weight = readline(prompt = "enter weight: ")
## enter weight:
hnum = as.numeric(height)
wnum = as.numeric(weight)
a = 2
b = 703
hnum2 = hnum^2
resulta = wnum / hnum2
print(resulta)
## [1] NA
Use this function to calculate your BMI.