fork(17) download
  1. Program Combinaison;
  2. Var cnp : Real;
  3. n, p : Integer ;
  4. (**************************************)
  5. Function fact (x : Integer) : LongInt;
  6. Var f : LongInt ;
  7. i : Integer ;
  8. Begin
  9. f := 1 ;
  10. For i := 2 To x Do f := f * i;
  11. fact := f ;
  12. End;
  13. (*************************************)
  14. Begin
  15. Repeat
  16. Writeln ('Donner deux entiers : ');
  17. ReadLn (p, n);
  18. Until (0<p) and (p<n);
  19. cnp := fact (n) / (fact (p) * fact (n-p));
  20. Writeln('Combinaison = ', cnp :4:2);
  21. End.
Compilation error #stdin #stdout 0s 0KB
stdin
3
6
stdout
Standard output is empty