zax2002

factorial

Oct 20th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.25 KB | None | 0 0
  1. program factorial;
  2. var
  3.     i:integer;
  4.     result:longInt;
  5.     input:integer;
  6. begin
  7.     result := 1;
  8.     write('Введите число: ');
  9.     readln(input);
  10.     for i:=1 to input do begin
  11.         result := result * i;
  12.     end;
  13.     writeln(input, '! = ', result);
  14. end.
Advertisement
Add Comment
Please, Sign In to add comment