Print Friendly and PDF
Here is simply adding two array ‪among them 

Example 


#‎include‬<iostream>
#include<conio.h>
using namespace std;
int main()
{
int n,i,j,k;
cout<<"enter size for two arrays:";
cin>>n;
int *arr=new int[n];
cout<<"enter first array"<<endl;
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
cout<<"enter second array:"<<endl;
for(int j=0;j<n;j++)
{
cin>>arr[j];
}
cout<<"arrays after addition are:"<<endl;
for(int k=0;k<n;k++)
{
cout<<arr[i]+arr[j]<<endl;
}
}
zubairsaif

Zubair saif

A passionate writer who loves to write on new technology and programming

Post A Comment:

0 comments: