Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var a := new Stack<integer>;
- s: integer;
- begin
- for var i := 1 to 10 do
- a.Push(random(-10,20));
- writeln(a);
- s := a.Where(x -> x > 0).Sum();
- writeln(s);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement