Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool provjera(int mat[][vel],int br)
- {
- for(int i=0;i<br;i++)
- {
- for(int j=0;j<br;j++)
- {
- if(i==(br/2)&&j==(br/2))
- {
- continue;
- }
- else
- {
- if(i==j)//ZA GLAVNU DIJAGONALU
- {
- if(mat[i][j]!=mat[(br-1)-i][(br-1)-j])
- {
- return false;
- }
- }
- if(i+j==(br-1))//ZA SPOREDNU DIJAGONALU
- {
- if(mat[i][j]!=mat[(br-1)-i][(br-1)-j])
- {
- return false;
- }
- }
- if(i==(br/2))//ZA HORIZONTALU
- {
- if(mat[(br-1)/2][j]!=mat[(br-1)/2][(br-1)-j])
- {
- return false;
- }
- }
- if(j==(br/2))//ZA VERTIKALU
- {
- if(mat[i][(br-1)/2]!=mat[(br-1)-i][j])
- {
- return false;
- }
- }
- }
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement