#include <stdio.h>
int factorial(int n) {
int f;
for(f = 1; n > 1; n--)
f *= n;
return f;
}
int npr(int n,int r) {
return factorial(n)/factorial(n-r);
}
int main() {
int n, r;
n = 4;
r = 3;
printf("%dp%d = %d /n", n, r, npr(n,r));
return 0;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265371.html