If it was someone close to me, I would rather that you told me versus me walking around grossing people out. You could broach it as a health concern. Tell them you've noticed lately that their breath is stronger than usual and you wanted to let them know in case it was a sign of dental disease. They're going to be embarrassed. If you're kind about it, they should get over it. If it's a casual acquaintance or work person, go the gum route.
There is no proper way of telling a person they have bad breath without hurting them as this is a personal issue though you could hint at it without being blunt. You could repeatedly offer them fresh breath mints or bring up the topic of dental hygiene in their presence until they get the hint.
Carry 2 packs of your favorite gum in your pocket and every time you see him you take out both packs and you stick a piece in your mouth then put your pack back in your pocket as you give them a whole back -- and - say - Here have some gum -- keep the whole pack .