Solved

SUM 2 INTEGER ARRAYS INTO 1

Posted on 2016-11-15
10
129 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 41888451
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
ID: 41888470
Thanks for comment mlmcc !

Result  - 5  7  9

Thank You !
0
 
LVL 101

Expert Comment

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

How do you iterate through an array?

mlmcc
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 2

Author Comment

by:vbmn
ID: 41888539
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 38

Expert Comment

by:Geert Gruwez
ID: 41888600
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
 
LVL 2

Author Comment

by:vbmn
ID: 41888634
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 38

Expert Comment

by:Geert Gruwez
ID: 41888644
with 10 you mean the length of the number

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

Author Comment

by:vbmn
ID: 41888657
I have translated the commentary on google translator!

If it helps to get a solution!

Thank You.
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 41890280
It looks like english will be a bigger problem than explaining how to program
0
 
LVL 27

Accepted Solution

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This is about my first experience with programming Arduino.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

627 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