Continue statement problem

I used for loop to make a program. it goes like this:
.
.
.
for(i=0;i<10;i++)
if(i==0){
cout<<*Question*;
cin>>b[i];
if(b[i]=='y')
continue;
else if(b[i]=='n')
exit(0);}
if(i==1){
.
.
.


If i give input 'y' and hit enter, the cursor goes to next line. if i hit enter again, it exits the program. what is the mistake in the program? I used the header files - <iostream>, <conio>, <stdio>, <stdlib>, <process>, <math>

P.S 1: I am not getting any error while running the program. This means i have used the proper header files and there are no bugs.

P.S 2: I am doing a questionnaire program. If the input is 'y', i want to skip to the next iteration.
Use brackets.
1
2
3
4
for(...) {
if (i==0)...
...
}

Not
1
2
3
for(...)
if (i==0)...
...
Topic archived. No new replies allowed.