PROGRAM-:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n,a[20],i;
cout<<"enter the number of element in array"<<"\n";
cin>>n;
cout<<"enter the elements of array"<<"\n";
for(i=0;i<n;i++)
{
cin>>a[i];
}
cout<<"entered elements of array are";
for(i=0;i<n;i++)
{
cout<<"a["<<i<<"]="<<a[i]<<"\n";
}
getch();
}
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n,a[20],i;
cout<<"enter the number of element in array"<<"\n";
cin>>n;
cout<<"enter the elements of array"<<"\n";
for(i=0;i<n;i++)
{
cin>>a[i];
}
cout<<"entered elements of array are";
for(i=0;i<n;i++)
{
cout<<"a["<<i<<"]="<<a[i]<<"\n";
}
getch();
}
0 comments:
Post a Comment