include
using namespace std;
main()
{
int a[10], n=5, c;
for(c=0;c {
cin >>a[c];
}
for(c=0;c {
if(a[c]!=42)
{
cout << a[c]<< '\n';
}
else
{
return 0;
}
};
return 0;
}
even if i made it to stop after reading 42 ... i'm unable to remove 'n' or the limit of for loop ... it needs an upper limit to be defined. for(c=0; ???;c++)