Travers - Data Structure
#include<iostream>
using namespace std;
int main()
{
int i, n, a[100];
cout<<"Enter the range of array:"<<endl;
cin>>n;
cout<<"Enter the element of array:"<<endl;
for(i=0;i<n;i++)
cin>>a[i];
cout<<" After traversing... : "<<endl;
for(i=0;i<n;i++)
cout<<a[i]<<endl;
}
0 Comments