#include<iostream>
#include<conio.h>
#include<string.h>
using namespace std;
int main()
{
char ch;
do
{
char str[80];
cout<<"\nEnter The String\n";
gets(str);
int len=strlen(str);
for(int i=0;i<len;i++)
cout<<str[i];
cout<<"\nContinue?\n";
cin>>ch;
}
while(ch=='y' || ch=='Y');
getch();
return 0;
}
On executing the above program, the loop asks "Continue?" only once and after that it skips the whole code in the do-while loop and goes to the statement of "Continue?". Please tell me what is the mistake??