-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadditionque.java
More file actions
38 lines (32 loc) · 834 Bytes
/
Copy pathadditionque.java
File metadata and controls
38 lines (32 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
public class additionque {
public static void main(String[] args) {
int num = 5;
int[] n1 = new int[5];
n1[0]='1';
n1[1]='6';
n1[2]='3';
n1[3]='5';
n1[4]='9';
for(int i=0; i<5; i++){
//System.out.println(n1[i]);
}
int[] a1 = new int[5];
a1[0]='2';
a1[1]='4';
a1[2]='2';
a1[3]='6';
a1[4]='3';
for (int i=0; i<5; i++) {
//System.out.println(a1[i]);
}
int[] b1 = new int[5];
for(int i=0; i<5; i++){
b1[i]=num;
b1[i] = n1[i] + a1[i];
}
System.out.println("valu of a1 + n1");
for(int i=0; i<5; i++){
System.out.print(b1[i]);
}
}
}