10/31/2015

C++ Program To Print Element Of An Array

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 :-

#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:-


C++ Program To Print Element Of An Array

Ghanendra Yadav

Ghanendra Yadav

Hello, I Am Ghanendra Yadav Owner of This Blog, I am professional Blogger and Programmer. I Love Programming, Logo Making, And Banner Designing. My Highest Qualification is MCA From NIT Warangal. You Can Find Me On Social Media Through Below Link And If You Have Any Query Related To Programming And Other Subject Comment Below or You Can Mail Me I Will Try To Answer Within 24 Hours Email:- yghanendra@student.nitw.ac.in

Find me on Social Media

Facebook | Twitter | Google+ | RSS Feed

No comments:

Post a Comment