+
Write a program to get and print the array elements.in c++
Sample Input:
5
4 6 7 8 9
Sample Output:
4 6 7 8 9
Answers
Answered by
0
Answer:
int main( ) {
int arr[10] , n ;
cout<<"Enter number of elements in the array:";
cin>>n;
for(int i =0; i < n ; i++) {
cout<<"Enter array element" <<i +1 << " :" ;
cin>>arr[i] ;
}
cout<<"Array elements are:" ;
for(int i =0; i<n ; i++ ){
cout<<arr[i] <<" " ;
}
return 0 ;
}
Similar questions