Problems
Receive natural numbers N and M as input, and write a program that prints all cases in which the sum of the outcomes from rolling a die N times becomes M. N is an integer not greater than 10.
Example
3 10
1 3 6
1 4 5
1 5 4
1 6 3
2 2 6
2 3 5
2 4 4
2 5 3
2 6 2
3 1 6
3 2 5
3 3 4
3 4 3
3 5 2
3 6 1
4 1 5
4 2 4
4 3 3
4 4 2
4 5 1
5 1 4
5 2 3
5 3 2
5 4 1
6 1 3
6 2 2
6 3 1
Source
자기주도C언어프로그래밍