I am not very good at programming and am only 14, but my program uses a string variable and says no to whatever you type. Primative, I know, but the programme has a repeat option but when the programme repeats, it doesnt ask for the input again it just says no.
Any help?Code:#include <iostream> #include <string> #include <stdlib.h> using namespace std; int main() { string Question; int LoopStop; do { cout<<"Please Ask The Computer A Question:\n"<<flush; getline(cin,Question); cout<<" \n"<<flush; cout<<"NO!\n"<<flush; cout<<" \n"<<flush; cout<<"Would you like to continue? (0 for yes/ 1 for no)\n"<<flush; cin >> LoopStop; cout<<" \n"<<flush; system ("CLS"); } while ( LoopStop == 0 ); }



LinkBack URL
About LinkBacks


