there are some rabbits and peacocks in a zoo . the total number of their heads is 60 and total number of their legs is 192 . find the number of total rabbits ?
let the number of rabbits and peacocks be ' r ' and ' p ' respectively . as each animal has only one head , so r + p = 60 - - - ( 1 ) each rabbit has 4 legs and each peacock has 2 legs . total number of legs of rabbits and peacocks , 4 r + 2 p = 192 - - - ( 2 ) multiplying equation ( 1 ) by 2 and subtracting it from equation ( 2 ) , we get = > 2 r = 72 = > r = 36 . answer : a
divide(subtract(192, multiply(const_2, 60)), subtract(const_4, const_2))