A former Mount Royal University student union president has been sentenced to 18 months in jail for robbing a bank.

Meghan Melnyk has told the court she had a gambling problem and couldn't pay her rent when she robbed a Servus Credit Union in February of 2012.

She had entered the southeast Calgary branch, handed the teller a note demanding cash and indicated she had a weapon.

During sentence submissions, her lawyer noted Melnyk had completed a gambling recovery program and is now a keynote speaker for the group.

Along with the jail sentence, she will be on probation for a maximum of three years and must get counselling.