import java.util.Scanner;
class Programsaddaa{
public static void main(String[] args){
int i,n;
Scanner sc=new Scanner(System.in);
System.out.println("enter the array size");
n=sc.nextInt();
int arr1[]= new int[n];
int arr2[]=new int[n];
int arr3[]=new int[n];
System.out.println("enter the first array element");
for(i=0;i<n;i++)
{
arr1[i]=sc.nextInt();
}
System.out.println("enter the second array element");
for(i=0;i<n;i++)
{
arr2[i]=sc.nextInt();
}
for(i=0;i<n;i++)
{
arr3[i]=arr1[i]+arr2[i];
System.out.println(arr3[i]);
}
}
}
Post a Comment