machkovskitomche

ispitna/string

Aug 13th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. int lit(char zbor[],char niza[])
  2. {
  3. int i,j,goima=0;
  4. for(i=0;i<strlen(zbor);i++)
  5. {
  6. for(j=0;j<strlen(niza);j++)
  7. {
  8. if(zbor[i]==niza[j])
  9. {
  10. printf("GO NAJDE %c\n",zbor[i]);
  11. goima=1;
  12. break;
  13. }
  14. }
  15. if(goima==0) return 0;
  16. goima = 0;
  17. }
  18. return 1;
  19. }
  20. int main()
  21. {
  22. char niza[]={'b','o','s','k','o','\0'};
  23. char zbor[]={'b','k','\0'};
  24. printf("%d",lit(zbor,niza));
  25. return 0;
  26. }
Add Comment
Please, Sign In to add comment