Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 147
  • Last Modified:

SUM 2 INTEGER ARRAYS INTO 1

How to sum 2 integer arrays into 1 array ?

For example : maximum integer value is 10  ! ! ! ! !

Thank You.
0
vbmn
Asked:
vbmn
  • 4
  • 3
  • 2
  • +1
1 Solution
 
mlmccCommented:
What do you mean by sum 2 integer arrays?

Given
array 1 - 1  2  3
array 2 - 4  5  6

Result  - 5  7  9
or
Result - 1  2  3  4  5  6
or
something else

mlmcc
0
 
vbmnAuthor Commented:
Thanks for comment mlmcc !

Result  - 5  7  9

Thank You !
0
 
mlmccCommented:
Since this is a typical learning exercise, what have you done thus far?

How do you iterate through an array?

mlmcc
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
vbmnAuthor Commented:
I just gave an example of a question,
and I wanted to apply the summation arrays at higher maximum number of 10 !

As 0..16777215 !
24-bit !
or
QWORD 64-bit !

Thank You.
0
 
Geert GruwezOracle dbaCommented:
what has 10 got to do with this question ?

you aren't making much sense

what's with the exclamation marks ! after each number ?

do you always write numbers ending with a !    ?

if you put a qword in an integer, you'll get a range check error.
if you haven't switched it off in the compiler options ... i think it's off by default
0
 
vbmnAuthor Commented:
10 is an example of the maximum numbers !

However, I want to apply Your solution to a higher maximum numbers !

What applied to pictures, sound, date, etc. !

As 16-bit (sound), 24-bit (image), 32-bit (3D color), 64-bit (date) !

Thank You.
0
 
Geert GruwezOracle dbaCommented:
with 10 you mean the length of the number

i assume english is not your native language ?
0
 
vbmnAuthor Commented:
I have translated the commentary on google translator!

If it helps to get a solution!

Thank You.
0
 
Geert GruwezOracle dbaCommented:
It looks like english will be a bigger problem than explaining how to program
0
 
Sinisa VukCommented:
anyway.... in pseudo-code:

- set new dynamic array Sum to same length of array 1
- iterate for each element in array 1 (till end)
... and do put sum of two elements from array 1 and 2 into array Sum
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now