#include
using namespace std;
int main() {
int n[10];
int count=0;
int i=0;
cout<<“Input :\n”;
for(i=0;i<10;i++)
{
cin>>n[i];
if(n[i] == 42)
{
cin>>n[i];
count=i;
i=12;
}
}
cout<<“Output :”<<endl;
for(i=0;i<count;i++)
{
if(n[i]==42)
{
break;
}
else
{
cout<<n[i]<<endl;
}
}
return 0;
}
i do not know why on submission he says its wrong
why iostream is not shown, while posting its here when i post it
created
last reply
- 5
replies
- 319
views
- 2
users