Sum of Array: Difference between revisions
Content deleted Content added
mNo edit summary |
revert multiple spam |
||
Line 1: | Line 1: | ||
{{task}} |
|||
[http://mfirishka.ifrance.com/view/new/redol-alves.htm redol, alves] [http://atrayah.ifrance.com/topic/hp-scanner.htm hp scanner 4670] [http://gajar.ifrance.com/html/modelle-e.htm modelle e cubiste] [http://lekusya.ifrance.com/library/html/presidente-dellla/ presidente dellla repubblica] [http://sm4.ifrance.com/lib/amd-/ amd 64 3000 winchester socket 939] [http://lightmyfire0214.ifrance.com/topic/giudizi-universali/ giudizi universali] [http://krychan.ifrance.com/content/view/rtl-tv.htm rtl9 tv com] [http://atrayah.ifrance.com/topic/ospedale-perugia.htm ospedale perugia] [http://nokros.ifrance.com/data/calypso/ calypso] [http://gabe95.ifrance.com/html/pietrificazione/ pietrificazione] [http://squoi-oop.ifrance.com/topic/parata-arcobaleno/ parata arcobaleno] [http://trumanburb.ifrance.com/view/new/uomini-nudi.htm uomini nudi x donne] [http://lekusya.ifrance.com/library/html/parasole-brevi/ parasole brevi] [http://horcrionebay.ifrance.com/resources/articles/esami-istruzione.htm esami istruzione] [http://sm4.ifrance.com/lib/scarica-prophilax/ scarica prophilax video] [http://alishca-st.ifrance.com/text/directory/asus-avxlan.htm asus a7v8x-lan] [http://alishca-st.ifrance.com/text/directory/d-lgs.htm d lgs 267 2000] [http://cocopuff66.ifrance.com/text/directory/www-racconti/ www racconti erotici it] [http://dejablu503.ifrance.com/description/lib/due-cazzi.htm due cazzi] [http://trumanburb.ifrance.com/view/new/melita-house.htm melita house hotel] [http://gajar.ifrance.com/html/banca-di.htm banca di credito coperativo dei due mari] [http://gabe95.ifrance.com/html/luto/ luto] [http://trumanburb.ifrance.com/view/new/nerovision-plugin.htm nerovision plugin dvd] [http://horcrionebay.ifrance.com/resources/articles/barman-the.htm barman the rigt mix] [http://call-shotgun.ifrance.com/view/new/il-pensiero/ il pensiero di freud] [http://zeakk.ifrance.com/resources/articles/crack-per.htm crack per singles] [http://sm4.ifrance.com/lib/nardi-gas/ nardi gas 90] [http://alishca-st.ifrance.com/text/directory/i-magnifici.htm i magnifici 4] [http://cocopuff66.ifrance.com/text/directory/claudio-cecchetti/ claudio cecchetti] [http://mfirishka.ifrance.com/view/new/esempi-di.htm esempi di excel] [http://dejablu503.ifrance.com/description/lib/brother-.htm brother 1840 c] [http://trumanburb.ifrance.com/view/new/business-phone.htm business phone system] [http://call-shotgun.ifrance.com/view/new/gemboy-teorema/ gemboy teorema] [http://alishca-st.ifrance.com/text/directory/bluetooth-ricevitore.htm bluetooth ricevitore gps] [http://zeakk.ifrance.com/resources/articles/italia-europa.htm italia europa] [http://trumanburb.ifrance.com/view/new/stokke-.htm stokke - peel] [http://squoi-oop.ifrance.com/topic/luigis/ luigis] [http://cocopuff66.ifrance.com/text/directory/cherokee-/ cherokee 2 5 td sport] [http://sm4.ifrance.com/lib/dieci-immagini/ dieci immagini per alexander] [http://atrayah.ifrance.com/topic/notebook-qosmio.htm notebook qosmio] [http://squoi-oop.ifrance.com/topic/youma-diakite/ youma diakite] [http://lekusya.ifrance.com/library/html/serena-grandi/ serena grandi nude] [http://horcrionebay.ifrance.com/resources/articles/mommy-got.htm mommy got boob] [http://krychan.ifrance.com/content/view/circolare-ministeriale.htm circolare ministeriale 454 06 04 04] [http://dejablu503.ifrance.com/description/lib/baci-famosi.htm baci famosi] [http://gabe95.ifrance.com/html/trucco-gta/ trucco gta iii pc] [http://squoi-oop.ifrance.com/topic/hard-disk/ hard disk maxtor ide 120gb] [http://trumanburb.ifrance.com/view/new/vigili-fuoco.htm vigili fuoco it] [http://cocopuff66.ifrance.com/text/directory/testo-messaggio/ testo messaggio d amore matia bazar] [http://cocopuff66.ifrance.com/text/directory/consiglio-dei/ consiglio dei ministri] [http://alishca-st.ifrance.com/text/directory/cani-husky.htm cani husky regalasi] [http://horcrionebay.ifrance.com/resources/articles/opel-roma.htm opel roma] [http://smegmacheez.ifrance.com/content/view/frase-romantica/ frase romantica] [http://sm4.ifrance.com/lib/honda-/ honda accord 1.8i 16v s] [http://trumanburb.ifrance.com/view/new/www-ebey.htm www ebey com] [http://lightmyfire0214.ifrance.com/topic/modelli-lettera/ modelli lettera] [http://lightmyfire0214.ifrance.com/topic/pentium/ pentium 560] [http://flawedamythyst.ifrance.com/img/styles/pellicole-kodak.htm pellicole kodak] [http://sm4.ifrance.com/lib/profondo-rosso/ profondo rosso dei goblin] [http://cocopuff66.ifrance.com/text/directory/philips-hr/ philips hr 7638 80] [http://zeakk.ifrance.com/resources/articles/uomini-ombra.htm uomini ombra] [http://flawedamythyst.ifrance.com/img/styles/fedina-oro.htm fedina oro bianco] [http://flawedamythyst.ifrance.com/img/styles/circoli.htm circoli] [http://lightmyfire0214.ifrance.com/topic/lg-gsa/ lg gsa 4163b] [http://atrayah.ifrance.com/topic/tracce-maturita.htm tracce maturita 2004 it] [http://gabe95.ifrance.com/html/caravan-the/ caravan. the ultimate anthology] [http://lightmyfire0214.ifrance.com/topic/gli-auguri/ gli auguri natalizi da atari italia] [http://krychan.ifrance.com/content/view/peredur.htm peredur] [http://flawedamythyst.ifrance.com/img/styles/download-california.htm download california mp3 gratis] [http://zeakk.ifrance.com/resources/articles/formentera-offerte.htm formentera offerte] [http://cocopuff66.ifrance.com/text/directory/carta-fabriano/ carta fabriano] [http://atrayah.ifrance.com/topic/copertina-massimo.htm copertina massimo di cataldo] [http://nokros.ifrance.com/data/kily-minogue/ kily minogue] [http://lekusya.ifrance.com/library/html/testo-kf/ testo kf tree] [http://krychan.ifrance.com/content/view/stampante-laser.htm stampante laser a3 bianco nero] [http://mfirishka.ifrance.com/view/new/i-flintstones.htm i flintstones] [http://squoi-oop.ifrance.com/topic/hp-l/ hp l2335] [http://atrayah.ifrance.com/topic/penna-per.htm penna per pc] [http://gabe95.ifrance.com/html/donne-pelose/ donne pelose gratis] [http://sm4.ifrance.com/lib/carmen-sandiego/ carmen sandiego] [http://zeakk.ifrance.com/resources/articles/unicredit-mutuo.htm unicredit mutuo prima casa] [http://lekusya.ifrance.com/library/html/e-mail/ e mail lapo elkann] [http://joshuaw-wise.ifrance.com/img/styles/perrea/ perrea] [http://alishca-st.ifrance.com/text/directory/regalo-cucciolo.htm regalo cucciolo] [http://mfirishka.ifrance.com/view/new/mayfair.htm mayfair] [http://cocopuff66.ifrance.com/text/directory/muvo/ muvo 2] [http://flawedamythyst.ifrance.com/img/styles/midi-tg.htm midi tg5] [http://trumanburb.ifrance.com/view/new/tramonto-di.htm tramonto di un eroe] [http://horcrionebay.ifrance.com/resources/articles/morningstar-it.htm morningstar it] [http://lightmyfire0214.ifrance.com/topic/nos-vamos/ nos vamos de fiesta] [http://lekusya.ifrance.com/library/html/monografia-com/ monografia com] [http://smegmacheez.ifrance.com/content/view/classifica-banche/ classifica banche italiane] [http://gajar.ifrance.com/html/mppro-plug.htm mp3pro plug in] [http://trumanburb.ifrance.com/view/new/cockta.htm cockta] [http://trumanburb.ifrance.com/view/new/u-s.htm u s robotics broadband router with usb] [http://horcrionebay.ifrance.com/resources/articles/forni-ad.htm forni ad incasso nardi] [http://lekusya.ifrance.com/library/html/video-gemello/ video gemello diversi] [http://nokros.ifrance.com/data/batteria-acer/ batteria acer travelmate 500] [http://flawedamythyst.ifrance.com/img/styles/univicion-con.htm univicion con] [http://mfirishka.ifrance.com/view/new/giochi-da.htm giochi da tavolo] [http://joshuaw-wise.ifrance.com/img/styles/digicom-hub/ digicom hub ethernet] [http://joshuaw-wise.ifrance.com/img/styles/ethernet-video/ ethernet video] [http://mfirishka.ifrance.com/view/new/my-friends.htm my friends hot mom] [http://nokros.ifrance.com/data/pagine-gialle/ pagine gialle roma] [http://squoi-oop.ifrance.com/topic/cala-ratjada/ cala ratjada diamant] [http://atrayah.ifrance.com/topic/you-re.htm you re the first] [http://call-shotgun.ifrance.com/view/new/macromedia-mx/ macromedia mx] [http://krychan.ifrance.com/content/view/hard-disk.htm hard disk esterni usb 2] [http://smegmacheez.ifrance.com/content/view/cayes-les/ cayes, les-] [http://atrayah.ifrance.com/topic/lingerie-love.htm lingerie love kylie] [http://sm4.ifrance.com/lib/sodimm-/ sodimm 256 pc133] [http://trumanburb.ifrance.com/view/new/kettler-marathon.htm kettler marathon] [http://mfirishka.ifrance.com/view/new/boogiepop-phantom.htm boogiepop phantom. evolution 2] [http://squoi-oop.ifrance.com/topic/los-temerarios/ los temerarios] [http://dejablu503.ifrance.com/description/lib/www-parchis.htm www parchis con] [http://alishca-st.ifrance.com/text/directory/siamo-soli.htm siamo soli nell immenso] [http://krychan.ifrance.com/content/view/previsioni-meteo.htm previsioni meteo svizzera] [http://squoi-oop.ifrance.com/topic/xsara/ xsara 1.4] [http://lightmyfire0214.ifrance.com/topic/asus-pade/ asus p5ad2-e premium] [http://smegmacheez.ifrance.com/content/view/discoteche-di/ discoteche di milano] [http://zeakk.ifrance.com/resources/articles/jmi-hendrix.htm jmi hendrix] [http://joshuaw-wise.ifrance.com/img/styles/angeli-demoni/ angeli demoni] [http://joshuaw-wise.ifrance.com/img/styles/mah-jong/ mah jong fortuna] [http://atrayah.ifrance.com/topic/comet-reggiseno.htm comet reggiseno] [http://sm4.ifrance.com/lib/saab-/ saab 9 3 aero] [http://sm4.ifrance.com/lib/canon/ canon 70 300] [http://mfirishka.ifrance.com/view/new/regalo-per.htm regalo per lui] [http://call-shotgun.ifrance.com/view/new/libri-antichi/ libri antichi] [http://lekusya.ifrance.com/library/html/fab-vicenza/ fab vicenza] [http://sm4.ifrance.com/lib/fuck-ass/ fuck ass] [http://nokros.ifrance.com/data/nina-/ nina xxx] [http://gajar.ifrance.com/html/amplificatore-lettore.htm amplificatore lettore dvd] [http://zeakk.ifrance.com/resources/articles/hotel-tonnara.htm hotel tonnara] [http://cocopuff66.ifrance.com/text/directory/testi-musical/ testi musical jesus christ superstar] [http://nokros.ifrance.com/data/maxtor-one/ maxtor one touch] [http://joshuaw-wise.ifrance.com/img/styles/fever-di/ fever di michael buble] [http://gabe95.ifrance.com/html/mini-cooper/ mini cooper 1300] [http://lightmyfire0214.ifrance.com/topic/my-band/ my band eminem testo] [http://zeakk.ifrance.com/resources/articles/hires-webcam.htm hires webcam wb 3400t] [http://dejablu503.ifrance.com/description/lib/navigare-anonimi.htm navigare anonimi] [http://flawedamythyst.ifrance.com/img/styles/fotovoltaici-pannelli.htm fotovoltaici pannelli] [http://zeakk.ifrance.com/resources/articles/oltre-il.htm oltre il dolore] [http://sm4.ifrance.com/lib/anti-yeux/ anti yeux rouges] [http://lekusya.ifrance.com/library/html/presentatrici-tv/ presentatrici tv] [http://lekusya.ifrance.com/library/html/classe-amplificatori/ classe amplificatori] [http://squoi-oop.ifrance.com/topic/biggie/ biggie] [http://atrayah.ifrance.com/topic/amorini.htm amorini] [http://gabe95.ifrance.com/html/mensajes-de/ mensajes de texto bellsouth] [http://squoi-oop.ifrance.com/topic/immagini-avatar/ immagini avatar di orchi] [http://sm4.ifrance.com/lib/fafa-de/ fafa de belem] [http://lightmyfire0214.ifrance.com/topic/psp-winning/ psp winning eleven] [http://lekusya.ifrance.com/library/html/www-xtra/ www xtra com] [http://horcrionebay.ifrance.com/resources/articles/forno-.htm forno 90 rex] [http://lekusya.ifrance.com/library/html/kevin-lyttle/ kevin lyttle] [http://joshuaw-wise.ifrance.com/img/styles/nina-piensa/ nina piensa en ti text] [http://lekusya.ifrance.com/library/html/samsung/ samsung 997] [http://horcrionebay.ifrance.com/resources/articles/branald-adolf.htm branald, adolf] [http://lekusya.ifrance.com/library/html/stampante-laser/ stampante laser a colori a3] [http://nokros.ifrance.com/data/ala-parson/ ala parson] [http://lightmyfire0214.ifrance.com/topic/ivo/ ivo] [http://call-shotgun.ifrance.com/view/new/tmpgenc/ tmpgenc] [http://krychan.ifrance.com/content/view/kampala.htm kampala] [http://alishca-st.ifrance.com/text/directory/eleonora-pedron.htm eleonora pedron calendario] [http://atrayah.ifrance.com/topic/starlancer.htm starlancer] [http://alishca-st.ifrance.com/text/directory/puntatore-laser.htm puntatore laser] [http://joshuaw-wise.ifrance.com/img/styles/cartelli-divieto/ cartelli divieto] [http://dejablu503.ifrance.com/description/lib/i-never.htm i never gonna dance again] [http://mfirishka.ifrance.com/view/new/tivoli-model.htm tivoli model] [http://squoi-oop.ifrance.com/topic/one-mini/ one mini] [http://gabe95.ifrance.com/html/appunti-universitari/ appunti universitari] [http://joshuaw-wise.ifrance.com/img/styles/female-ejaculation/ female ejaculation] [http://mfirishka.ifrance.com/view/new/www-webank.htm www webank] [http://cocopuff66.ifrance.com/text/directory/get-ready/ get ready roachford] [http://call-shotgun.ifrance.com/view/new/il-libro/ il libro della giungla dvd] [http://zeakk.ifrance.com/resources/articles/roma-innsbruck.htm roma innsbruck biglietti aerei] [http://joshuaw-wise.ifrance.com/img/styles/panificio-belluno/ panificio belluno] [http://lightmyfire0214.ifrance.com/topic/on-a/ on a love groove] [http://joshuaw-wise.ifrance.com/img/styles/barcellona-hotel/ barcellona hotel catalonia princesa] [http://joshuaw-wise.ifrance.com/img/styles/pinguini-alla/ pinguini alla riscossa] [http://krychan.ifrance.com/content/view/bmw-z.htm bmw z3 2 8] [http://alishca-st.ifrance.com/text/directory/volo-milano.htm volo milano tenerife] [http://lightmyfire0214.ifrance.com/topic/asus-x/ asus x700] [http://squoi-oop.ifrance.com/topic/baranek/ baranek] [http://mfirishka.ifrance.com/view/new/morire-due.htm morire due volte] [http://lekusya.ifrance.com/library/html/tnt-courrier/ tnt courrier express] [http://horcrionebay.ifrance.com/resources/articles/modem-adsl.htm modem adsl con interfaccia usb e] [http://krychan.ifrance.com/content/view/giuseppe-manca.htm giuseppe manca] [http://joshuaw-wise.ifrance.com/img/styles/il-duca/ il duca e la ballerina] [http://horcrionebay.ifrance.com/resources/articles/limiti-di.htm limiti di velocita] [http://zeakk.ifrance.com/resources/articles/rio-sei.htm rio sei quella] [http://lightmyfire0214.ifrance.com/topic/scheda-madre/ scheda madre 939] [http://joshuaw-wise.ifrance.com/img/styles/cinema-gay/ cinema gay] [http://cocopuff66.ifrance.com/text/directory/foto-tatto/ foto tatto] [http://call-shotgun.ifrance.com/view/new/date-com/ date com] [http://horcrionebay.ifrance.com/resources/articles/racconti-trio.htm racconti trio] [http://alishca-st.ifrance.com/text/directory/kit-vivavoce.htm kit vivavoce parrot] [http://krychan.ifrance.com/content/view/amstrad-home.htm amstrad home theatre wireless] [http://dejablu503.ifrance.com/description/lib/bog.htm bog] [http://cocopuff66.ifrance.com/text/directory/whigfield-was/ whigfield was a time] [http://cocopuff66.ifrance.com/text/directory/reader-xd/ reader xd] [http://joshuaw-wise.ifrance.com/img/styles/mala-tempora/ mala tempora currunt] [http://gabe95.ifrance.com/html/canon/ canon 500] [http://call-shotgun.ifrance.com/view/new/enermax-egaxve/ enermax eg375ax-ve] [http://flawedamythyst.ifrance.com/img/styles/danzer-pump.htm danzer pump it up] [http://alishca-st.ifrance.com/text/directory/foto-con.htm foto con gay che sborrano] [http://horcrionebay.ifrance.com/resources/articles/cellula-vegetale.htm cellula vegetale e animale] [http://flawedamythyst.ifrance.com/img/styles/doctor-zivago.htm doctor zivago] [http://dejablu503.ifrance.com/description/lib/volvo-auto.htm volvo auto] [http://lightmyfire0214.ifrance.com/topic/elezioni-angri/ elezioni angri] [http://flawedamythyst.ifrance.com/img/styles/zorba-mp.htm zorba mp3] [http://gabe95.ifrance.com/html/le-son/ le son qui tue] [http://krychan.ifrance.com/content/view/d-lgs.htm d lgs 276 03] [http://lightmyfire0214.ifrance.com/topic/hust/ hust] [http://zeakk.ifrance.com/resources/articles/lettori-wma.htm lettori wma] [http://gabe95.ifrance.com/html/dvd-sacd/ dvd sacd] [http://dejablu503.ifrance.com/description/lib/olio-carli.htm olio carli] [http://joshuaw-wise.ifrance.com/img/styles/behringer-mixer/ behringer mixer 12] [http://flawedamythyst.ifrance.com/img/styles/lettore-portatile.htm lettore portatile cd usb] [http://horcrionebay.ifrance.com/resources/articles/non-rien.htm non rien de rien] [http://sm4.ifrance.com/lib/foto-king/ foto king arthur] [http://lekusya.ifrance.com/library/html/cristina-grillo/ cristina grillo succhia un cazzone nero] [http://squoi-oop.ifrance.com/topic/pasta-lavamani/ pasta lavamani] [http://call-shotgun.ifrance.com/view/new/digital-media/ digital media pro] [http://lightmyfire0214.ifrance.com/topic/win-megazine/ win megazine] [http://sm4.ifrance.com/lib/il-grande/ il grande prato gem boy] [http://horcrionebay.ifrance.com/resources/articles/saint-george.htm saint george] [http://lekusya.ifrance.com/library/html/scarlati/ scarlati] [http://mfirishka.ifrance.com/view/new/io-ti.htm io ti penso] [http://joshuaw-wise.ifrance.com/img/styles/matrix-online/ matrix online] [http://squoi-oop.ifrance.com/topic/www-winmix/ www winmix it] [http://sm4.ifrance.com/lib/qlq-c/ qlq c30] [http://gabe95.ifrance.com/html/smspronti/ smspronti] [http://squoi-oop.ifrance.com/topic/sara-acampora/ sara acampora] [http://krychan.ifrance.com/content/view/caparezza-habemus.htm caparezza habemus capa] [http://squoi-oop.ifrance.com/topic/the-planetary/ the planetary] [http://nokros.ifrance.com/data/verbatim-dvd/ verbatim dvd r 8 5] [http://lekusya.ifrance.com/library/html/lose-it/ lose it] [http://sm4.ifrance.com/lib/www-movilnet/ www movilnet com] [http://trumanburb.ifrance.com/view/new/amd-dissipatori.htm amd dissipatori 754] [http://alishca-st.ifrance.com/text/directory/mandex.htm mandex] [http://atrayah.ifrance.com/topic/blasco-eusebio.htm blasco, eusebio] [http://alishca-st.ifrance.com/text/directory/sapphire-radeon.htm sapphire radeon 9200] [http://lekusya.ifrance.com/library/html/armadillo-kinght/ armadillo kinght 3] [http://gabe95.ifrance.com/html/ricevitore-gps/ ricevitore gps auto] [http://gajar.ifrance.com/html/lebanese.htm lebanese] [http://horcrionebay.ifrance.com/resources/articles/foto-di.htm foto di cartoni hentai] [http://nokros.ifrance.com/data/king-of/ king of queens] [http://trumanburb.ifrance.com/view/new/b-b.htm b b camilla roma] [http://joshuaw-wise.ifrance.com/img/styles/sanitarios/ sanitarios] [http://alishca-st.ifrance.com/text/directory/microsoft-flight.htm microsoft flight simulator] [http://atrayah.ifrance.com/topic/epl.htm epl 7100] [http://lightmyfire0214.ifrance.com/topic/happy-days/ happy days sister act] [http://smegmacheez.ifrance.com/content/view/la-freccia/ la freccia nera. vol. 02] [http://krychan.ifrance.com/content/view/fuerte-olimpo.htm fuerte olimpo] [http://squoi-oop.ifrance.com/topic/acanthion/ acanthion] [http://dejablu503.ifrance.com/description/lib/volvo-v.htm volvo v50 kinetic 2 0 diesel] [http://mfirishka.ifrance.com/view/new/scarpi-donna.htm scarpi donna] [http://flawedamythyst.ifrance.com/img/styles/mp-usb.htm mp3 usb 1gb] [http://joshuaw-wise.ifrance.com/img/styles/internet-explorer/ internet explorer 5] [http://call-shotgun.ifrance.com/view/new/nec-videoproiettori/ nec videoproiettori] [http://gajar.ifrance.com/html/fate-ed.htm fate ed elfi] [http://smegmacheez.ifrance.com/content/view/bonita-de/ bonita de mas] [http://zeakk.ifrance.com/resources/articles/san-bernardino.htm san bernardino mountains] [http://horcrionebay.ifrance.com/resources/articles/memory-olimpus.htm memory olimpus] [http://call-shotgun.ifrance.com/view/new/adult-dating/ adult dating service online] [http://smegmacheez.ifrance.com/content/view/sapphire-radeon/ sapphire radeon 9600xt ultimate] [http://gabe95.ifrance.com/html/puede-ser/ puede ser] [http://mfirishka.ifrance.com/view/new/la-storia.htm la storia del trasmettitore fm] [http://mfirishka.ifrance.com/view/new/nure.htm nure] [http://lekusya.ifrance.com/library/html/tuner-tv/ tuner tv acquisizione e tv] [http://gajar.ifrance.com/html/midi-musica.htm midi musica italiana] [http://gajar.ifrance.com/html/ipertrofia-benigna.htm ipertrofia benigna prostata] [http://nokros.ifrance.com/data/hooverphonics/ hooverphonics] [http://lekusya.ifrance.com/library/html/reti-letto/ reti letto] [http://joshuaw-wise.ifrance.com/img/styles/salute-dei/ salute dei capello] [http://smegmacheez.ifrance.com/content/view/haydee-raymundo/ haydee raymundo] [http://atrayah.ifrance.com/topic/scaleoview-t.htm scaleoview t17-2] [http://nokros.ifrance.com/data/effeminato/ effeminato] [http://alishca-st.ifrance.com/text/directory/phyllis-haver.htm phyllis haver] [http://sm4.ifrance.com/lib/acufeno/ acufeno] [http://nokros.ifrance.com/data/foame-de/ foame de bani] [http://mfirishka.ifrance.com/view/new/warlock-iii.htm warlock iii] [http://mfirishka.ifrance.com/view/new/gbc-rilegatrici.htm gbc rilegatrici] [http://alishca-st.ifrance.com/text/directory/roma-bruxelles.htm roma bruxelles biglietti aerei] [http://squoi-oop.ifrance.com/topic/asciugabiancheria-san/ asciugabiancheria san giorgio] [http://mfirishka.ifrance.com/view/new/panasonic-lumix.htm panasonic lumix 2] [http://squoi-oop.ifrance.com/topic/car-insurance/ car insurance quotes] [http://dejablu503.ifrance.com/description/lib/eddy-jam.htm eddy jam] [http://gabe95.ifrance.com/html/www-literary/ www literary it] [http://trumanburb.ifrance.com/view/new/lua.htm lua] [http://dejablu503.ifrance.com/description/lib/thoia.htm thoia] [http://dejablu503.ifrance.com/description/lib/cover-vasco.htm cover vasco buoni o cattivi] [http://call-shotgun.ifrance.com/view/new/codici-blocco/ codici blocco nec e313] [http://alishca-st.ifrance.com/text/directory/burana-carmina.htm burana, carmina] [http://trumanburb.ifrance.com/view/new/zecchino-d.htm zecchino d oro 2003] [http://mfirishka.ifrance.com/view/new/asrock-k.htm asrock k7] [http://dejablu503.ifrance.com/description/lib/www-capo.htm www capo carbonara it] [http://mfirishka.ifrance.com/view/new/i-on.htm i on t wonna know] [http://zeakk.ifrance.com/resources/articles/milano-saragozza.htm milano saragozza biglietti aerei] [http://krychan.ifrance.com/content/view/aspirapolvere-parquet.htm aspirapolvere parquet 8296] [http://smegmacheez.ifrance.com/content/view/beni-benassi/ beni benassi hit my heart] [http://cocopuff66.ifrance.com/text/directory/agp-x/ agp 1x] [http://lekusya.ifrance.com/library/html/philips-mp/ philips mp3 key015] [http://call-shotgun.ifrance.com/view/new/calcetto-ridotto/ calcetto ridotto] [http://gabe95.ifrance.com/html/stampante-barcode/ stampante barcode] [http://alishca-st.ifrance.com/text/directory/nuova-opel.htm nuova opel astra] [http://lightmyfire0214.ifrance.com/topic/alternativi/ alternativi] [http://horcrionebay.ifrance.com/resources/articles/la-quindicesima.htm la quindicesima epistola] [http://sm4.ifrance.com/lib/runaway/ runaway] [http://zeakk.ifrance.com/resources/articles/thomas-forsberg.htm thomas forsberg] [http://zeakk.ifrance.com/resources/articles/assicurazione-san.htm assicurazione san giuliano milanese] [http://joshuaw-wise.ifrance.com/img/styles/athlon-/ athlon 64 bit] [http://lekusya.ifrance.com/library/html/summer-sunshine/ summer sunshine midi] [http://lightmyfire0214.ifrance.com/topic/scarpa-donna/ scarpa donna] [http://cocopuff66.ifrance.com/text/directory/converse-all/ converse all star chuck taylor] [http://squoi-oop.ifrance.com/topic/www-satu/ www sat4u org] [http://trumanburb.ifrance.com/view/new/www-figc.htm www figc it] [http://mfirishka.ifrance.com/view/new/ives-frederic.htm ives, frederic eugene] [http://alishca-st.ifrance.com/text/directory/albergo-.htm albergo 4 stelle ginevra] [http://krychan.ifrance.com/content/view/i-mate.htm i mate] [http://horcrionebay.ifrance.com/resources/articles/zoe.htm zoe] [http://lekusya.ifrance.com/library/html/palmare/ palmare 640] [http://gajar.ifrance.com/html/vino-passito.htm vino passito] [http://flawedamythyst.ifrance.com/img/styles/vocabolario-italiano.htm vocabolario italiano russo] [http://lightmyfire0214.ifrance.com/topic/justin-e/ justin e britney insieme] [http://lekusya.ifrance.com/library/html/malattia-di/ malattia di hodgkin] [http://gajar.ifrance.com/html/cerrar.htm cerrar] [http://sm4.ifrance.com/lib/ipaq/ ipaq 3115] [http://lekusya.ifrance.com/library/html/passera-di/ passera di michel hunzicher] [http://lekusya.ifrance.com/library/html/parma-shopping/ parma shopping] [http://joshuaw-wise.ifrance.com/img/styles/video-porno/ video porno di britney spears] [http://cocopuff66.ifrance.com/text/directory/editor-/ editor 2 0 skynet] [http://alishca-st.ifrance.com/text/directory/pubblicita-adidas.htm pubblicita adidas nadia] [http://dejablu503.ifrance.com/description/lib/ricoh-aficio.htm ricoh aficio fx12] [http://gajar.ifrance.com/html/seagate-.htm seagate 7200 8 sata] [http://gajar.ifrance.com/html/rover.htm rover 100] [http://alishca-st.ifrance.com/text/directory/www-polini.htm www polini it] [http://krychan.ifrance.com/content/view/la-guerra.htm la guerra in irak] [http://call-shotgun.ifrance.com/view/new/decreto-immobili/ decreto immobili] [http://smegmacheez.ifrance.com/content/view/lhassa-apso/ lhassa apso] [http://zeakk.ifrance.com/resources/articles/porsche-roma.htm porsche roma] [http://gabe95.ifrance.com/html/fredrikshamn/ fredrikshamn] [http://joshuaw-wise.ifrance.com/img/styles/here-j/ here j go again] [http://squoi-oop.ifrance.com/topic/hp-/ hp 1200 toner] [http://smegmacheez.ifrance.com/content/view/him-dark/ him dark light] [http://gajar.ifrance.com/html/donna-sesso.htm donna sesso animali] [http://lightmyfire0214.ifrance.com/topic/bmw-k/ bmw k 1200 s] [http://atrayah.ifrance.com/topic/gioco-ps.htm gioco ps2 sport] [http://alishca-st.ifrance.com/text/directory/hotel-economico.htm hotel economico marsiglia] [http://gabe95.ifrance.com/html/it-is/ it is cause i m cool] [http://alishca-st.ifrance.com/text/directory/comune-di.htm comune di vicchio] [http://mfirishka.ifrance.com/view/new/troy-trailer.htm troy trailer] [http://alishca-st.ifrance.com/text/directory/j-teme.htm j teme] [http://lightmyfire0214.ifrance.com/topic/scarpe-volley/ scarpe volley] [http://sm4.ifrance.com/lib/hyperballoid/ hyperballoid] [http://gabe95.ifrance.com/html/hazzard-la/ hazzard. la prima stagione completa] [http://call-shotgun.ifrance.com/view/new/frimley-and/ frimley and camberley] [http://sm4.ifrance.com/lib/ho/ ho 945] [http://sm4.ifrance.com/lib/donna-nuda/ donna nuda e pipi] [http://zeakk.ifrance.com/resources/articles/tyan-sli.htm tyan sli] [http://atrayah.ifrance.com/topic/cd-vasco.htm cd vasco] [http://gabe95.ifrance.com/html/ncch-dl/ ncch dl] [http://dejablu503.ifrance.com/description/lib/ottomano.htm ottomano] [http://gajar.ifrance.com/html/jeep-wrangler.htm jeep wrangler 2.5] [http://gajar.ifrance.com/html/mitac-mio.htm mitac mio 168 256 palmari] [http://nokros.ifrance.com/data/gola-profonda/ gola profonda nera] [http://krychan.ifrance.com/content/view/hot-porn.htm hot porn] [http://call-shotgun.ifrance.com/view/new/ccnl-vetrerie/ ccnl vetrerie] [http://joshuaw-wise.ifrance.com/img/styles/piedi-nudi/ piedi nudi femminili fetish] [http://lekusya.ifrance.com/library/html/comune-di/ comune di stella] [http://sm4.ifrance.com/lib/berlinale/ berlinale] [http://atrayah.ifrance.com/topic/traduzione-if.htm traduzione if ain t got you] [http://joshuaw-wise.ifrance.com/img/styles/un-possibile/ un possibile titolo per king of fighters 3d] [http://dejablu503.ifrance.com/description/lib/conseguenze-di.htm conseguenze di una notte] [http://squoi-oop.ifrance.com/topic/schweiz/ schweiz] [http://cocopuff66.ifrance.com/text/directory/prestito-padova/ prestito padova] [http://zeakk.ifrance.com/resources/articles/cavo-dati.htm cavo dati per motorola] [http://krychan.ifrance.com/content/view/mario-catcher.htm mario catcher] [http://zeakk.ifrance.com/resources/articles/kevin-lyttle.htm kevin lyttle music] [http://sm4.ifrance.com/lib/tastiera-musicale/ tastiera musicale usb] [http://squoi-oop.ifrance.com/topic/minch-the/ minch, the-] [http://zeakk.ifrance.com/resources/articles/o-.htm o 190 chrome cromo] [http://squoi-oop.ifrance.com/topic/tv-samsung/ tv samsung lcd 20] [http://lightmyfire0214.ifrance.com/topic/incontro-senigallia/ incontro senigallia] [http://nokros.ifrance.com/data/punto-y/ punto y aparte tego calderon] [http://gajar.ifrance.com/html/le-nozze.htm le nozze di zeus] [http://alishca-st.ifrance.com/text/directory/giochi-di.htm giochi di carte scopa] [http://trumanburb.ifrance.com/view/new/win-it.htm win it] [http://dejablu503.ifrance.com/description/lib/yaesu-vx.htm yaesu vx 150] [http://gabe95.ifrance.com/html/pattinaggio-ghiaccio/ pattinaggio ghiaccio] [http://nokros.ifrance.com/data/nomadi-quaranta/ nomadi quaranta] [http://lightmyfire0214.ifrance.com/topic/costruisci-casa/ costruisci casa] [http://smegmacheez.ifrance.com/content/view/mb-corporation/ mb corporation] [http://trumanburb.ifrance.com/view/new/giochi-su.htm giochi su marry potter] [http://flawedamythyst.ifrance.com/img/styles/rumori-treno.htm rumori treno] [http://lekusya.ifrance.com/library/html/yetisport/ yetisport 1] [http://flawedamythyst.ifrance.com/img/styles/fscaller-code.htm fscaller code] [http://call-shotgun.ifrance.com/view/new/watch-christian/ watch christian tv] [http://squoi-oop.ifrance.com/topic/kaspersky-anti/ kaspersky anti virus] [http://joshuaw-wise.ifrance.com/img/styles/ministero-dell/ ministero dell ambiente] {{task}} |
|||
Compute the sum of the elements of an Array |
Compute the sum of the elements of an Array |
||
Line 11: | Line 11: | ||
$var:=0 |
$var:=0 |
||
For ($i;1;Size of array($list)) |
For ($i;1;Size of array($list)) |
||
$var:=$var |
$var:=$var+$list{$i} |
||
End for |
End for |
||
Line 20: | Line 20: | ||
Sum : Integer := 0; |
Sum : Integer := 0; |
||
for I in Int_Array'range loop |
for I in Int_Array'range loop |
||
Sum := Sum |
Sum := Sum + Int_Array(I); |
||
end loop; |
end loop; |
||
Line 30: | Line 30: | ||
repeat with i in array |
repeat with i in array |
||
-- very important -- list index starts at 1 not 0 |
-- very important -- list index starts at 1 not 0 |
||
set product to product |
set product to product + i |
||
end repeat |
end repeat |
||
Line 42: | Line 42: | ||
50 REM Find the sum of elements in the array |
50 REM Find the sum of elements in the array |
||
60 SUM = 0 |
60 SUM = 0 |
||
70 FOR I = 1 TO 5: SUM = SUM |
70 FOR I = 1 TO 5: SUM = SUM + ARRAY(I): NEXT I |
||
80 PRINT "The sum is ";SUM |
80 PRINT "The sum is ";SUM |
||
==[[C plus plus|C |
==[[C plus plus|C++]]== |
||
[[Category:C plus plus]] |
[[Category:C plus plus]] |
||
Line 55: | Line 55: | ||
int list[] = { 1, 2, 3 } ; |
int list[] = { 1, 2, 3 } ; |
||
int sum = 0 ; |
int sum = 0 ; |
||
for( int i = 0 ; i < 3 ; i |
for( int i = 0 ; i < 3 ; i++ ) |
||
{ |
{ |
||
sum |
sum += list[i]; |
||
} |
} |
||
} |
} |
||
Line 69: | Line 69: | ||
{ |
{ |
||
int list[] = { 1, 2, 3 } ; |
int list[] = { 1, 2, 3 } ; |
||
std::accumulate(list, list |
std::accumulate(list, list + 3, 0); |
||
return 0; |
return 0; |
||
} |
} |
||
Line 78: | Line 78: | ||
{ |
{ |
||
T accum = 0; |
T accum = 0; |
||
for (unsigned i=0; i<n; i |
for (unsigned i=0; i<n; i++) |
||
accum |
accum += array[i]; |
||
return accum; |
return accum; |
||
} |
} |
||
Line 103: | Line 103: | ||
int arg_length = arg.Length; |
int arg_length = arg.Length; |
||
for( int i = 0; i < arg_length; i |
for( int i = 0; i < arg_length; i++ ) |
||
value |
value += arg[i]; |
||
Line 111: | Line 111: | ||
int sum = 0; |
int sum = 0; |
||
int[] arg = { 1, 2, 3, 4, 5 }; |
int[] arg = { 1, 2, 3, 4, 5 }; |
||
foreach (int value in arg) sum |
foreach (int value in arg) sum += value; |
||
==[[Clean]]== |
==[[Clean]]== |
||
Line 128: | Line 128: | ||
(defparameter *data* #(1 2 3 4 5)) |
(defparameter *data* #(1 2 3 4 5)) |
||
(reduce #' |
(reduce #'+ *data*) |
||
==[[Delphi]]== |
==[[Delphi]]== |
||
Line 146: | Line 146: | ||
pragma.enable("accumulator") |
pragma.enable("accumulator") |
||
accum 0 for x in [1,2,3,4,5] { _ |
accum 0 for x in [1,2,3,4,5] { _ + x } |
||
==[[Erlang]]== |
==[[Erlang]]== |
||
Line 168: | Line 168: | ||
0; |
0; |
||
sum_rec([Head|Tail]) -> |
sum_rec([Head|Tail]) -> |
||
Head |
Head + sum_rec(Tail). |
||
% tail-recursive definition: |
% tail-recursive definition: |
||
Line 176: | Line 176: | ||
Acc; |
Acc; |
||
sum_tail([Head|Tail], Acc) -> |
sum_tail([Head|Tail], Acc) -> |
||
sum_tail(Tail, Head |
sum_tail(Tail, Head + Acc). |
||
==[[Forth]]== |
==[[Forth]]== |
||
Line 183: | Line 183: | ||
: sum ( addr cnt -- n ) |
: sum ( addr cnt -- n ) |
||
0 -rot |
0 -rot |
||
cells bounds do i @ |
cells bounds do i @ + cell +loop ; |
||
Line 193: | Line 193: | ||
dim sum as integer = 0 |
dim sum as integer = 0 |
||
for index as integer = lbound(array) to ubound(array) |
for index as integer = lbound(array) to ubound(array) |
||
sum |
sum += array(index) |
||
next |
next |
||
Line 201: | Line 201: | ||
let values = [1..10] |
let values = [1..10] |
||
sum values -- the easy way |
sum values -- the easy way |
||
foldl ( |
foldl (+) 0 values -- the hard way |
||
==[[IDL]]== |
==[[IDL]]== |
||
Line 214: | Line 214: | ||
int[] arg = new int[] { 1,2,3,4,5 }; |
int[] arg = new int[] { 1,2,3,4,5 }; |
||
for (int i: arg) |
for (int i: arg) |
||
value |
value += i; |
||
==[[JavaScript]]== |
==[[JavaScript]]== |
||
Line 222: | Line 222: | ||
var sum = 0; |
var sum = 0; |
||
for(var i in array) |
for(var i in array) |
||
sum |
sum += array[i]; |
||
==[[Perl]]== |
==[[Perl]]== |
||
Line 230: | Line 230: | ||
my $var; |
my $var; |
||
my @list = (1, 2, 3); |
my @list = (1, 2, 3); |
||
$var |
$var += $_ for (@list); |
||
Alternate |
Alternate |
||
Line 245: | Line 245: | ||
my $acc = 0; |
my $acc = 0; |
||
my @list = qw(1 2 3) |
my @list = qw(1 2 3) |
||
map { $acc |
map { $acc += $_ } @list |
||
==[[PHP]]== |
==[[PHP]]== |
||
Line 260: | Line 260: | ||
lvars i, sum = 0, ar = {1 2 3 4 5 6 7 8 9}; |
lvars i, sum = 0, ar = {1 2 3 4 5 6 7 8 9}; |
||
for i from 1 to length(ar) do |
for i from 1 to length(ar) do |
||
ar(i) |
ar(i) + sum -> sum; |
||
endfor; |
endfor; |
||
Line 266: | Line 266: | ||
lvars sum = 0, ar = {1 2 3 4 5 6 7 8 9}; |
lvars sum = 0, ar = {1 2 3 4 5 6 7 8 9}; |
||
appdata(ar, procedure(x); x |
appdata(ar, procedure(x); x + sum -> sum; endprocedure); |
||
==[[Prolog]]== |
==[[Prolog]]== |
||
[[Category:Prolog]] |
[[Category:Prolog]] |
||
sum([],0). |
sum([],0). |
||
sum([H|T],X) :- sum(T,Y), X is H |
sum([H|T],X) :- sum(T,Y), X is H + Y. |
||
test |
test |
||
:- sum([1,2,3,4,5,6,7,8,9],X). |
:- sum([1,2,3,4,5,6,7,8,9],X). |
||
Line 286: | Line 286: | ||
ary = [1,2,3,4,5] |
ary = [1,2,3,4,5] |
||
sum = ary.inject{|currentSum,element|currentSum |
sum = ary.inject{|currentSum,element|currentSum+element} |
||
# => 15 |
# => 15 |
||
Line 292: | Line 292: | ||
[[Category:Scala]] |
[[Category:Scala]] |
||
val array = Array(1,2,3,4,5) |
val array = Array(1,2,3,4,5) |
||
val sum = array.foldLeft(0)(_ |
val sum = array.foldLeft(0)(_ + _) |
||
This is a shortcut for |
This is a shortcut for |
||
val sum = array.foldLeft(0){(currentSum, element) => currentSum |
val sum = array.foldLeft(0){(currentSum, element) => currentSum + element} |
||
==[[Seed7]]== |
==[[Seed7]]== |
||
Line 307: | Line 307: | ||
begin |
begin |
||
for value range valueArray do |
for value range valueArray do |
||
sum |
sum +:= value; |
||
end for; |
end for; |
||
end func; |
end func; |
||
Line 319: | Line 319: | ||
val array = [1,2,3,4,5]; |
val array = [1,2,3,4,5]; |
||
foldl op |
foldl op+ 0 array; |
||
==[[Tcl]]== |
==[[Tcl]]== |
||
Line 326: | Line 326: | ||
Assuming the values are in a list named <tt>listname</tt>: |
Assuming the values are in a list named <tt>listname</tt>: |
||
set result [expr [join $listname |
set result [expr [join $listname +]] |
||
==[[Toka]]== |
==[[Toka]]== |
||
Line 332: | Line 332: | ||
[ ( array size -- sum ) |
[ ( array size -- sum ) |
||
>r 0 r> [ over i swap get-element |
>r 0 r> [ over i swap get-element + ] iterate nip ] is sum-array |
||
==[[UNIX Shell]]== |
==[[UNIX Shell]]== |
||
Line 344: | Line 344: | ||
list="1 2 3" |
list="1 2 3" |
||
for n in $list |
for n in $list |
||
do sum="$(($sum |
do sum="$(($sum + $n))" |
||
done |
done |
||
echo $sum |
echo $sum |
||
Line 352: | Line 352: | ||
sum=0 |
sum=0 |
||
for n |
for n |
||
do sum="$(($sum |
do sum="$(($sum + $n))" |
||
done |
done |
||
echo $sum |
echo $sum |
||
Line 360: | Line 360: | ||
sum=0 |
sum=0 |
||
while read n |
while read n |
||
do sum="$(($sum |
do sum="$(($sum + $n))" |
||
done |
done |
||
echo $sum |
echo $sum |
||
Line 371: | Line 371: | ||
SUM=0; |
SUM=0; |
||
for i in $LIST; do |
for i in $LIST; do |
||
SUM=$[$SUM |
SUM=$[$SUM + $i]; |
||
done; |
done; |
||
echo $SUM |
echo $SUM |
Revision as of 06:32, 24 August 2007
![Task](http://static.miraheze.org/rosettacodewiki/thumb/b/ba/Rcode-button-task-crushed.png/64px-Rcode-button-task-crushed.png)
You are encouraged to solve this task according to the task description, using any language you may know.
Compute the sum of the elements of an Array
4D
ARRAY INTEGER($list;0) For ($i;1;5) APPEND TO ARRAY($list;$i) End for $var:=0 For ($i;1;Size of array($list)) $var:=$var+$list{$i} End for
Ada
Int_Array : array(1..10) of Integer := (1,2,3,4,5,6,7,8,9,10); Sum : Integer := 0; for I in Int_Array'range loop Sum := Sum + Int_Array(I); end loop;
AppleScript
set array to {1, 2, 3, 4, 5} set product to 0 repeat with i in array -- very important -- list index starts at 1 not 0 set product to product + i end repeat
BASIC
10 REM Create an array with some test data in it 20 DIM ARRAY(5) 30 FOR I = 1 TO 5: READ ARRAY(I): NEXT I 40 DATA 1, 2, 3, 4, 5 50 REM Find the sum of elements in the array 60 SUM = 0 70 FOR I = 1 TO 5: SUM = SUM + ARRAY(I): NEXT I 80 PRINT "The sum is ";SUM
C++
Compiler: gcc 4.0.2
int main( int argc, char* argv[] ) { int list[] = { 1, 2, 3 } ; int sum = 0 ; for( int i = 0 ; i < 3 ; i++ ) { sum += list[i]; } }
Alternate
#include <numeric> int main( int argc, char* argv[] ) { int list[] = { 1, 2, 3 } ; std::accumulate(list, list + 3, 0); return 0; }
template alternative
template <typename T> T sum (const T *array, const unsigned n) { T accum = 0; for (unsigned i=0; i<n; i++) accum += array[i]; return accum; }
#include <iostream> using std::cout; using std::endl;
int main (void) { int aint[] = {1, 2, 3}; cout << sum(aint,3) << endl; float aflo[] = {1.1, 2.02, 3.003, 4.0004}; cout << sum(aflo,4) << endl; return 0; }
C#
int value = 0; int[] arg = { 1,2,3,4,5 }; int arg_length = arg.Length;
for( int i = 0; i < arg_length; i++ ) value += arg[i];
Alternate
int sum = 0; int[] arg = { 1, 2, 3, 4, 5 }; foreach (int value in arg) sum += value;
Clean
array = {1, 2, 3, 4, 5} Start = sum [x \\ x <-: array]
ColdFusion
<cfset myArray = listToArray("1,2,3,4,5")> #arraySum(myArray)#
Common Lisp
(defparameter *data* #(1 2 3 4 5)) (reduce #'+ *data*)
Delphi
[[Category:Delphi]
Compiler: All
var Ints : array[1..5] of integer = (1,2,3,4,5) ; i,Sum : integer = 0 ; begin for i := 1 to length(ints) do inc(sum,ints[i]) ; end;
E
pragma.enable("accumulator") accum 0 for x in [1,2,3,4,5] { _ + x }
Erlang
Using the standard libraries:
% create the list: L = lists:seq(1, 10).
% and compute its sum: S = lists:sum(L).
Or defining our own versions:
-module(list_sum). -export([sum_rec/1, sum_tail/1]).
% recursive definition: sum_rec([]) -> 0; sum_rec([Head|Tail]) -> Head + sum_rec(Tail).
% tail-recursive definition: sum_tail(L) -> sum_tail(L, 0). sum_tail([], Acc) -> Acc; sum_tail([Head|Tail], Acc) -> sum_tail(Tail, Head + Acc).
Forth
: sum ( addr cnt -- n ) 0 -rot cells bounds do i @ + cell +loop ;
FreeBASIC
dim array(4) as integer = { 1, 2, 3, 4, 5 }
dim sum as integer = 0 for index as integer = lbound(array) to ubound(array) sum += array(index) next
Haskell
let values = [1..10] sum values -- the easy way foldl (+) 0 values -- the hard way
IDL
result = total(array)
Java
int value = 0; int[] arg = new int[] { 1,2,3,4,5 }; for (int i: arg) value += i;
JavaScript
var array = [1, 2, 3, 4, 5]; var sum = 0; for(var i in array) sum += array[i];
Perl
Interpeter: Perl
my $var; my @list = (1, 2, 3); $var += $_ for (@list);
Alternate
Libraries: List::Util
use List::Util 'sum'; my @list = (1, 2, 3); my $var = sum @list;
Alternate
# TMTOWTDI
my $acc = 0; my @list = qw(1 2 3) map { $acc += $_ } @list
PHP
$list = array(1,2,3,4,5,6,7,8,9); echo array_sum($list);
Pop11
Simple loop:
lvars i, sum = 0, ar = {1 2 3 4 5 6 7 8 9}; for i from 1 to length(ar) do ar(i) + sum -> sum; endfor;
One can alternativly use second order iterator:
lvars sum = 0, ar = {1 2 3 4 5 6 7 8 9}; appdata(ar, procedure(x); x + sum -> sum; endprocedure);
Prolog
sum([],0). sum([H|T],X) :- sum(T,Y), X is H + Y.
test
:- sum([1,2,3,4,5,6,7,8,9],X). X =45;
Python
Interpeter: Python 2.5
total = sum([1, 2, 3, 4, 5, 6, 7, 8, 9])
Ruby
ary = [1,2,3,4,5] sum = ary.inject{|currentSum,element|currentSum+element} # => 15
Scala
val array = Array(1,2,3,4,5) val sum = array.foldLeft(0)(_ + _)
This is a shortcut for
val sum = array.foldLeft(0){(currentSum, element) => currentSum + element}
Seed7
const func integer: sumArray (in array integer: valueArray) is func result var integer: sum is 0; local var integer: value is 0; begin for value range valueArray do sum +:= value; end for; end func;
Call this function with:
writeln(sumArray([](1, 2, 3, 4, 5)));
Standard ML
val array = [1,2,3,4,5]; foldl op+ 0 array;
Tcl
Assuming the values are in a list named listname:
set result [expr [join $listname +]]
Toka
[ ( array size -- sum ) >r 0 r> [ over i swap get-element + ] iterate nip ] is sum-array
UNIX Shell
Interpreter: NetBSD 3.0's ash
From an internal variable, $IFS delimited:
sum=0 list="1 2 3" for n in $list do sum="$(($sum + $n))" done echo $sum
From the argument list (ARGV):
sum=0 for n do sum="$(($sum + $n))" done echo $sum
From STDIN, one integer per line:
sum=0 while read n do sum="$(($sum + $n))" done echo $sum
Interpreter: GNU bash, version 3.2.0(1)-release (i386-unknown-freebsd6.1)
From variable:
LIST='20 20 2'; SUM=0; for i in $LIST; do SUM=$[$SUM + $i]; done; echo $SUM