President Mohamud said some of the wounded were in a serious condition and the death toll could rise.
"Our people who were massacred ... included mothers with their children in their arms, fathers who had medical conditions, students who were sent to study, businessmen who were struggling with the lives of their families," he said after visiting the scene.
al Shebab, the al Qaeda-linked Islamist group that claimed responsibility, said the Education Ministry was at the center of a "war on minds" that teaches Somali children using a Christian-based syllabus.
Members of the security forces were among the dead and injured, its statement emailed to media said.
The first of the explosions hit the Education Ministry at around 2 p.m. on Saturday. The second hit minutes later as ambulances arrived and people gathered to help the victims.
The K5 intersection normally teems with people but it was quiet on Sunday, with emergency workers still cleaning blood from the streets and buildings.
Somalia's international partners condemned the attack and sent condolences to affected families.
The chairperson of the African Union Commission, Moussa Faki Mahamat, urged the international community to "redouble its efforts to ensure robust international support to Somalia's institutions in their struggle to defeat terrorist groups".
World Health Organization Director-General Tedros Adhanom Ghebreyesus tweeted that his organization was ready to provide support to the government to care for the injured.
These senseless attacks against innocent civilians including women and children only serve to remind us of the group's barbarity towards its own people and reveals the true hypocrisy of its intent," the European Union's foreign policy chief, Josep Borrell, said in a statement.
Al Shabaab, which is seeking to topple the government and establish its own rule based on an extreme interpretation of Islamic law, frequently stages attacks in Mogadishu and elsewhere.
With support from the United States and allied local militias, the president has launched an offensive against the group, although results have been limited.
Abdullahi Aden said his friend, Ilyas Mohamed Warsame, was killed in the terror attack.
"Exhausted and desperate, we found his body at midnight last night in hospital," he said. "I can't get the image out of my mind."