Solved

SUM 2 INTEGER ARRAYS INTO 1

Posted on 2016-11-15
10
56 Views
Last Modified: 2016-11-23
How to sum 2 integer arrays into 1 array ?

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

Thank You.
0
Comment
Question by:vbmn
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
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
 
LVL 2

Author Comment

by:vbmn
Comment Utility
Thanks for comment mlmcc !

Result  - 5  7  9

Thank You !
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
Since this is a typical learning exercise, what have you done thus far?

How do you iterate through an array?

mlmcc
0
 
LVL 2

Author Comment

by:vbmn
Comment Utility
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
 
LVL 36

Expert Comment

by:Geert Gruwez
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 2

Author Comment

by:vbmn
Comment Utility
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
 
LVL 36

Expert Comment

by:Geert Gruwez
Comment Utility
with 10 you mean the length of the number

i assume english is not your native language ?
0
 
LVL 2

Author Comment

by:vbmn
Comment Utility
I have translated the commentary on google translator!

If it helps to get a solution!

Thank You.
0
 
LVL 36

Expert Comment

by:Geert Gruwez
Comment Utility
It looks like english will be a bigger problem than explaining how to program
0
 
LVL 25

Accepted Solution

by:
Sinisa Vuk earned 500 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This is an explanation of a simple data model to help parse a JSON feed
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now