What's wrong with my computer? Reboots itself randomly?

Lenovo c540. When it is powered on it turns off and reboots itself and the screen turns black the green lines come up and then it goes to login screen. I ran a virus scan, spyware, even restored it to to its original settings. Also reinstalled original drivers. I even changed moved it to a different outlet thinking it may be a shortage but no still does it. I have no warranty. Had it just over a year. Nothing goes wrong until now.

Did you install any new hardware or software on a recent note. If yes, remove that and see if the PC gives a good bootup. What operating system are you using on the laptop. Is it a genuine one?