In this program we are declaring an array of 10. And then we are using For Loop to take input from user of each element of array. And then we are printing each element of the array using another For Loop.
Program:
// Program By http://solutionscpp.blogspot.com// Author Mansoor Ahmed
// GMail ID: secguy000@gmail.com
#include<iostream>
using namespace std;
int main()
{
int a[10];
for(int i=0; i<10; i++)
{
cout<<"Enter " <<i <<" Element of array: ";
cin>>a[i];
}
for(int j=0; j<10; j++)
{
cout<<j <<" Element of array is: " <<a[j] <<endl;
}
}
I found nice article in your blog.thank you for useful info
ReplyDeletewelookups