President Barack Obama urged voters in the United Kingdom to vote to remain in the European Union when they hold a referendum in June.