#include <iostream>#include <cstdio>using namespace std; int main() { // your code goes here int x =1; char ans[50]; while(5){ cout<<"Is your number "<<x<<" ?\n[yes/no]\n"; gets(ans); if(strcmp(ans,"yes")) break;} return 0;}
a b c d e
prog.cpp: In function 'int main()': prog.cpp:11:10: error: 'gets' was not declared in this scope gets(ans); ^ prog.cpp:12:21: error: 'strcmp' was not declared in this scope if(strcmp(ans,"yes")) ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!