daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3. void main(){
  4. int i=0;
  5. char str2[255],str1[256]=" ";
  6. cout<<"Vvedite stroky\n";
  7. cin.getline(str2,255);
  8. strcat(str1, str2);
  9. char *pstr = str1;
  10. int n = 0;
  11. while((pstr = strstr(pstr," end "))!=NULL)
  12. {
  13. n++;
  14. pstr+=5;
  15. }
  16. pstr = str1;
  17. while((pstr = strstr(pstr," or "))!=NULL)
  18. {
  19. n++;
  20. pstr+=4;
  21. }
  22. cout<<"\n"<<n<<" raza\n";
  23. cin>>n;
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top