Advertisement
sparrow02

7 szukanie

Dec 8th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include<string.h>
  3. #include<algorithm>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. string napis4="Ala ma kota";
  9. string szukaj="kot";
  10. size_t pozycja =napis4.find(szukaj);
  11. if(pozycja!=string::npos)
  12. {
  13. cout<<"znaleziono na pozycji"<<pozycja;
  14. }
  15. else{
  16. cout<<"Nieznaleziono"<<endl;
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement