C++: Program to enter integers in 1D Arrray

Program to enter numbers in an 1-D array of length 5.
#include <iostream>
using namespace std;
int main()
int a[5];
cout<<"Enter numbers in array"<<endl;
for(int i=0;i<5;i++){
for(int i=0;i<5;i++){
cout<<a[i]<<" ";
return 0;
In Association with Amazon.in


Popular Posts

Top 10 Web Sites Every Programmer Should Visit Daily

C++: Huffman Coding using STL

What is "namespace" and why do we use it?