Court sentences robber to 40 years imprisonment