Users Pricing

forum

Home Forums Calculations with array list elements. – MindStick

Calculations with array list elements.

Lillian Martin 2133 29 Oct 2014
I have an integer array list. It will always contain 5 integers. Now suppose it contains the numbers 10031. Now I want to do this calculation in the elements.

Add the numbers within this number, until you are left with a 1 or 2 digit number.

1.....0.....0.....3.....1

...1.....0......3....4

.......1.....3.....7

...........4....10 (When this occurs, separate into 1 + 0)

..............5..1 = 51. Result is 51.

I want the result when it is a double digit number. Please help.

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md