Saturday, 31 October 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

I Am Ghanendra Yadav Owner Of This Website. I Love Programming, Web Developing, Logo Making, Banner And Website designing. Currently I Am Studying In NIT Warangal And Also Working With WSDC( As Web Application Developer ) In NIT Warangal For Any Query Mail Me I Will 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