Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure main()
- local a,b
- a:=read()
- b:=sum(a)
- write(b)
- end
- procedure sum(n)
- local s,i
- s:=0
- every i:=1 to n do {
- s:=s+i
- }
- return s
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement