#include <iostream>
using namespace std;
class array
{
int a[5];
public :
void input ();
void display ();
};
void array::input ()
{
cout <<"Enter the values :"<<endl;
for (int i=0;i<5;i++)
{
cin>>a[i];
}
}
void array ::display ()
{
cout <<"The values are :"<<endl;
for (int i=0;i<5;i++)
{
cout <<a[i];
cout <<endl;
}
}
int main() {
array x;
x. input();
x. display ();
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: