The currency in Madagascar is the Malagasy ariary (AR or MGA). You’ll find ATMs in cities and larger towns, but in rural areas you’ll need to pay in cash. Euros are widely accepted, and US dollars and pound sterling are easy to exchange.
ATMs don’t issue small denomination ariary so it’s also useful to carry euros for use in the bigger cities, saving your local currency for regional use.