Hello Kirthy

Welcome to PCHF
The problem is most likely not the AC adapter. Does it have a charging light on the AC adapter? When you plug it in, is it lit up (green)?
A good way to test the AC adapter is to take the battery out of the laptop and then plug the AC adapter in. Then you want to wiggle the plug (gently) around and hold it in several different positions and try to power on your laptop. If the laptop does power on, hold the cable in place for a little bit and see if the computer stays on for a bit. Then try wiggling the cord again and see if the laptop shuts off.
If that does happen, then you know it is not the AC adapter that is causing the problem, it is most likely your DC jack is worn and has a bad/loose connection, or your DC jack is going bad.
If you find the AC adapter never loses a connection and keeps the unit powered on even if you wiggle the cord around, then your battery is probably just bad and won't take a charge. Or the port in your laptop that charges the battery may be defective.
The only reasonable problem to fix is if the battery itself is simply bad. Replacing a battery isn't incredibly expensive. I would try finding a replacement battery from a place that offers an unconditional return policy (if that place does exist). That way you can test a good battery, and if you still have problems, you can return it and get your money back.
If there are any problems in your laptop hardware, it is pretty much always uneconomical to repair.
I hope that helps
