From: "Иван Бишевац" Date: 2012-09-04T19:19:07+09:00 Subject: Re: how to sum element of array --047d7b15ae3587a1a204c8dd96e6 Content-Type: text/plain; charset=UTF-8 2012/9/4 Edward QU > dear all > > a_array=[2,4,6,8,10] > I want to sum the elements of the array: > 2+4+6+8+10 > how to write the script? > > many thanks! > best regards > Edward > > -- > Posted via http://www.ruby-forum.com/. > > One suggestion. I'm beginner in Ruby too, and I find http://ruby-doc.org/core-1.9.3/ very useful. --047d7b15ae3587a1a204c8dd96e6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
2012/9/4 Edward QU <lists@ruby-forum.com= >
dear all

a_array=3D[2,4,6,8,10]
I want to sum the elements of the array:
2+4+6+8+10
how to write the script?

many thanks!
best regards
Edward

--
Posted via http://= www.ruby-forum.com/.

One suggest= ion. I'm beginner in Ruby too, and I find=C2=A0http://ruby-doc.org/core-1.9.3/=C2=A0very useful.= =C2=A0
--047d7b15ae3587a1a204c8dd96e6--