fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int m, n, i, p = 1;
  6.  
  7. printf("m=\n");
  8. scanf("%d", &m);
  9. printf("n=\n");
  10. scanf("%d", &n);
  11. for (i = m - n + 1; i <= m; i++) {
  12. p *= i;
  13. }
  14. printf("p=%d\n", p);
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0.01s 1724KB
stdin
4
2
stdout
m=
n=
p=12