2+3+5
## [1] 10
66-3-(-4)
## [1] 67
32*3
## [1] 96
2**3 #2 raised to power of 3
## [1] 8
43/3
## [1] 14.33333
32%/%3 #Gives Numerator
## [1] 10
44%%3 #Gives remainder
## [1] 2
#numbers from 8 to 30 increment 6
for(i in seq(0, 30, 6)){
print(i)
}
## [1] 0
## [1] 6
## [1] 12
## [1] 18
## [1] 24
## [1] 30
myfirstfunction =function(x){
y=x**3+3*x+20
print(y)}
myfirstfunction(20)
## [1] 8080
myfirstfunction(20)
## [1] 8080