fork download
  1. #include <iostream>
  2. #include <string>
  3. #include<cstring>
  4. #include <cctype>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. char text[100];
  11. cout<<"Podawaj slowa, (kiedy skonczysz napisz \"gotowe\")\n";
  12. int count=0;
  13.  
  14. while(cin>>text)
  15. {
  16. if (!strcmp(text,"gotowe"))
  17. break;
  18.  
  19. count++;
  20. }
  21.  
  22. cout<<"wpisano "<<count<<" slow"<<endl;
  23.  
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 3344KB
stdin
to jest test gotowe
stdout
Podawaj slowa, (kiedy skonczysz napisz "gotowe")
wpisano 3 slow