Note: (Restricted functionality due to obvious reasons!)
Minimal Code ( Raw-View ) :
#include<iostream.h>
#include<conio.h>
class cse
{
public : int i,j,k,m;
int ar1[10], ar2[10],s[10];
public :
void enter_nos()
{
cout<<"Enter length of arrays : ";
cin>>m;
cout<<"Enter first array :"<<endl;
for(i=1; i<=m; i++)
{cin>>ar1[i];}
cout<<"Enter second array :"<<endl;
for(j=1; j<=m; j++)
{cin>>ar2[j];}
}
void show()
{
cout<<endl<<"The two arrays are : "<<endl;
cout<<"Array 1 : ";
for(k=1; k<=m; k++)
{cout<<ar1[k]<<" ";}
cout<<endl<<"Array 2 : ";
for(j=1; j<=m; j++)
{cout<<ar2[j]<<" ";}
}
void sum()
{
cout<<endl<<"The sum of two arrays is : ";
for(i=1; i<=m; i++)
{s[i]=ar1[i]+ar2[i];
cout<<s[i]<<" ";}
}
}s1,s2;
void main()
{
cout<<" ** This program adds two arrays ** "<<endl<<endl;
s1.enter_nos();
s1.show();
cout<<endl<<endl<<"Press any key to get the result !"<<endl;
getch();
s1.sum();
}