Problem :- Write A Program To Print Element Of An Array
Logic :- Just take a input from user and print all the element of array after that you can reverse check how C++ Program To Reverse An Array Sum Of Its Element
Solution :-
Output:-
Logic :- Just take a input from user and print all the element of array after that you can reverse check how C++ Program To Reverse An Array Sum Of Its Element
Solution :-
#include<iostream>
using namespace std;
int main()
{
//By-Ghanendra Yadav
int n,a[50],i;
cout<<"Enter The Size Of Array: \n";
cin>>n;
cout<<"Enter The Element Of Array: \n";
for(i=0;i<n;i++)
{
cin>>a[i];
}
cout<<"Output Of Array: ";
for(i=0;i<n;i++)
{
cout<<a[i]<<" ";
}
return 0;
}
Output:-
0 Comments: