x <- seq(-pi, pi, 0.1)
plot(x, cos(x))
Output
(Run the program to view its output)