Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int stirling(int n, int k){
- if(k==n){
- return 1;
- }else if(k==0){
- return 0;
- }else if(k > n){
- return 0;
- }
- return (n-1)*stirling(n-1, k)+stirling(n-1, k-1);
- }
- int main() {
- printf("Liczba stirlinga %d", stirling(0,2));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment