Advertisement
destr0y

Untitled

Mar 20th, 2020
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.23 KB | None | 0 0
  1. var a := new Stack<integer>;
  2. b: integer;
  3. c: int64 := 1;
  4. begin
  5.   write('Введите число: ');
  6.   readln(b);
  7.  
  8.   for var i := 1 to b do
  9.     a.Push(i);
  10.  
  11.   for var i := 1 to b do
  12.     c *= a.Pop();
  13.  
  14.   writeln(c);
  15. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement