#include <stdio.h>

int combinacao(int n, int k){
	if (k == n || k <= 0) // caso base
		return 1;
    else if(k > n){
        return 0;        
    }
	return combinacao(n - 1, k - 1) + combinacao(n - 1, k); // a recursão só funciona se o caso base estiver correto
}

int main(void){
	int combina = combinacao(10, 20);
	printf("%d", combina);
	return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: