Saturday, March 8, 2014

Array Fundamentals (How to store multiple values)

#include<iostream>
using namespace std;
int main()
{
int a[5];
for(int j=1;6>j;j++)
{
cout<<"Enter the age";
cin>>a[j];
}

for(int j=1;6>j;j++)
{
cout<<"you entered"<<a[j]<<endl;
}
return 0;
}

No comments :

Post a Comment