Peter ate $6$ cabbages in $6\div2=3$ days. In $7-3=4$ days, Peter ate $4\times10=10+10+10+10=40$ carrots. 
Peter Rabbit eats cabbages and carrots. Each day he eats either $$10$$ carrots or $$2$$ cabbages. Last week Peter ate $$6$$ cabbages. How many carrots did he eat last week? (2014 Math Kangaroo Problem, Level 1-2, Question \#18) 

A: $$20$$ 
B: $$30$$ 
C: $$34$$ 
D: $$40$$ 
E: $$50$$ 