Click on main4.cpp to get source.
/* File CExamples/Recursion/main4.cpp */
#include <stdio.h>
#include <inttypes.h> // for PRId64 printf format
#include <stdint.h>
extern int64_t combin(int, int);
/* program to test combin4.cpp; compile as
g++ -Wall -std=c++20 -DDEBUG combin4.c main4.c
Note: 2020 C++ standard for std:tuple
*/
int main(void)
{ int i, k;
printf("Enter first pair of arguments for combination: ");
fflush(stdout);
while(scanf("%d%d", &i, &k) == 2)
{ printf("combin(%4d,%4d)=%" PRId64 "\n", i, k, combin(i,k));
printf("Enter next pair of arguments for combination: ");
fflush(stdout);
};
return 0;
}