Skip to content

Commit c8a737f

Browse files
authored
Merge pull request #17 from MAHIMA01/master
Create README.md
2 parents f20a584 + 34a3425 commit c8a737f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ADD TWO ARRAYS OF SIZE N
2+
3+
## This is a problem for beginners who are just starting with array input output and learning operations on arrays. Following steps are followed:
4+
5+
- First, we take the size of the array as input (N).
6+
7+
- Then, the array 1, array 2, and sum array are declared to be of integer type and of size N.
8+
9+
- The space separated elements of array 1 are taken as input from user.
10+
11+
- The space separated elements of array 2 are taken as input from user.
12+
13+
- Now, a for loop is used to read each elements of both array 1 and array 2 starting from index 0 to N-1. Both the arrays are simultaneously added and eaquated to sum array of same index starting from 0 to N-1. <br/> i.e. sum[0] = array1[0] + array2[0] <br/> sum[1] = array1[1] + array2[1]... and so on.
14+
15+
- Lastly, the array sum which contains the final answer is printed as the output using another for loop starting from index 0 to N-1.
16+
17+
## #HAPPYCODING ;)

0 commit comments

Comments
 (0)