I have a range from $0$ to $8$ . I want to find that how many 3-digit numbers can be formed whose sum is equal to $20$.  

Non-Repetition of numbers:
$$
5+7+8=20 \\
$$
Repetition of numbers:
$$ 
4+8+8=20, \\ 
6+7+7=20, \\
8+6+6=20, 
$$
I want to know the number of ways that I can represent **20** using the sum of 3- positive integers. In repetition case, there is only **1** way which is mentioned above but in non-repetition case, we can also do it on paper but I want the general solution.