Is there a nice way to tell them?
I'm not quite sure I know what you mean by "a nice way". If you mean, a way that they won't be upset or won't cause a scene, you might try taking them out to dinner at a very nice restaurant and breaking the news to them there after a couple glasses of fine wine. That will probably force them to keep their voices down.
If they accuse you of being too young, you can point out that you've just taken them to a very nice restaurant, for which you're footing the bill, and therefore, if you're old enough to earn money and take them out, you're old enough to decide if you want to smoke or not.
If they accuse you of poor decision making, you can point out that you've just taken them to a very nice restaurant, and if you can pick out a nice restaurant without their help, you can also make a decision about which vices to embrace without their help.
If they criticize you for profligate spending on an unhealthy habit, you can point out that you've just taken them to a very nice restaurant, for which you're footing the bill, and that they've just had expensive wine, and if you're old enough to earn money and they don't mind drinking wine which costs a lot of money, then you have enough money to spend on cigarettes, and throw in the wine as a costly vice, too.
If you mean, a way that will make them happy, I would suggest that you find good studies showing evidence that smoking is good for you, will make you less prone to joblessness, depression, and will help you find a good husband/wife/partner; parents are notoriously in favor of good habits, work ethics, good mental health and good marriages.
If you can't find such studies, I might suggest waiting to tell them until you land the perfect job and spouse; then announce your job, introduce your spouse, and light a cigarette. They can hardly complain when you've given them such good news.