Mosques in the Federal Territories of Kuala Lumpur and Putrajaya have been turned into temporary accommodation for flood victims.