This code solves differential equation using 4th order Runge-Kutta algorithm.
In this code, I have assumed k=m=1 for the classical simple harmonic oscillator. One can obtain position, velocity and Kinetic, Potential and Total energy of the oscillator as a function of time.