wrong answer due to output

#include
using namespace std;
int main()
{
int a[5],i;
for(i=0;i<5;i++)
{
cin>>a*;
}
cout<<endl;
for(i=0;i<5;i++)
{
if(a*==42)
break;
cout<<a*<<endl;
}
}
pls help!!