#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char ch;
do{
cout<<"press Q or q to quit,press any key to continue : ";
cin.get(ch);
cin.ignore();
if(ch!='Q'&&ch!='q')
cout<<" you want to continue?\n";
else
cout<<"you press q to quit ";
}while(ch!='Q'&&ch!='q');
;
system("pause>NULL");
return 0;
}
my prof said that whenever how many the letter i input the output must be just one..
output
press any key to continue : ma.teresa l. sagun
you want to continue?
press any key to continue :
you want to continue?
press any key to continue :
you want to continue?
press any key to continue :
you want to continue?
press any key to continue :
you want to continue?
press any key to continue :
you want to continue?
press any key to continue :
it appears like this..will someone help me..