简体   繁体   中英

I don't understand the question. And I don't know where to start

Create a method addArray(int[ ] A)<\/code> that accepts a 1-dimensional array of integers. Each of the integers in the array is considered a part of a bigger whole integer, and this bigger integer is represented by the entire array. The method will add 1 to the whole integer representation and returns the corresponding array representation of the sum. For example, if A=[1,2,3]<\/code> then the whole number is 123. The method will return a new array, A0=[1,2,4]<\/code> .

<\/blockquote>"

I assume that his is a test question, so I will just give a clue.

You can create a string and then cast to a number or you could create a new number directly, but you will need to remember to put the number in the appropriate column (10, 100, 1000).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM