Raster calculator - complex conditional statement
I need help creating a raster calculator syntax. I want to normalize precipitation values with the mean for specific altitude-classes:
I have two input rasters
1: reclassified dtm, with 1==0>dtm<200, 2==200>dtm<400, 3==400>dtm<600, ???10== if 1800>dtm<2000, 11== dtm>2000
2: precipitation.
I want to create a statement like
???if reclassified dtm=1, precipitation should be divided by the value for the average precipitation in 0-200m altitude,
if reclassified dtm=2, precipitation should be divided by the value for the average precipitation in 200-400m altitude,
???.
and
if reclassified dtm=11, precipitation should be devided by the value for the average precipitation in >2000m altitude.???
Is there any way this can be done in raster calculator?
(I have already done statistics to find average precipitation in the different altitudes and reclassified a dtm)