Advertisement
Guest User

Untitled

a guest
Dec 10th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int matrica_sadrzana (int A[100][100],int v1,int s1,int B[100][100],int v2,int s2){
  5.  
  6. int i=0,j=0,l=0,k=0;
  7.  
  8.  
  9.  
  10.  
  11. for(i=0;i<=v1-v2;i++){
  12.  
  13. for(j=0;j<=s1-s2;j++){
  14.  
  15.  
  16.  
  17. if(A[i][j]==B[0][0]){
  18.  
  19. for(l=0;l<v2;l++){
  20.  
  21. for(k=0;k<s2;k++){
  22.  
  23. if(A[i+l][j+k]!=B[l][k]) break;
  24.  
  25. }
  26.  
  27. }
  28. if(l==v2 && k==s2)return 1;
  29.  
  30. }
  31.  
  32. }
  33.  
  34. }
  35.  
  36. return 0;
  37.  
  38. }
  39.  
  40. int main()
  41. {
  42.  
  43.  
  44. return 0;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement