If it's simply a cable, then all it does is connect the PC to the wall power. If it is a cable and a power supply, then it likely will not work, though this is likely not the case you describe as the connector would certainly not fit. A power supply looks like a big box in line with the cable.
Most likely the cable you're talking about looks like this:
If that's the case, you're good to go. These cables are highly interchangeable and the only thing you need to worry about is the current rating, which in your case seems more than adequate.