The problem can be rewritten as:
5x+10y+20z=50 or x+2y+4z=10 where x= no of 5c coins, y=no of 10c coins z=no of 20c coins. From here we could just list out the possibilities of of the triplet (x,y,z) given that x,y,z are non-negative integers. So:
(10,0,0)
(8,1,0)
(6,2,0)
(6,0,1)
(4,3,0)
(4,1,1)...