Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void dd(int sum, int count)
- {
- if(count == 6)
- {
- arr[sum % 7]++;
- return;
- }
- for(int i = 1; i <=6; i++)
- dd(sum + i, count + 1);
- }
- int main() {
- for(int i = 0; i < 8; i++)
- arr[i] = 0;
- dd(0, 0);
- for(int i = 0; i < 7; i++)
- cout<<arr[i]<<" ";
- cout<<endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment