Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #define MAX 505
- int main()
- {
- int A[MAX][MAX], B[MAX][MAX];
- int na, nb;
- scanf("%d%d", &na, &nb);
- for(int i = 0; i < na; i++) {
- for(int j = 0; j < na; j++) {
- scanf("%d", &A[i][j]);
- }
- }
- for(int i = 0; i < nb; i++) {
- for(int j = 0; j < nb; j++){
- scanf("%d", &B[i][j]);
- }
- }
- int transponed[MAX][MAX];
- for(int i = 0; i < na; i++) {
- for(int j = 0; j < na; j++) {
- transponed[i][j] = A[j][i];
- }
- }
- int razlika = 0;
- for(int i = 0; i < nb; i++) {
- for(int j = 0; j < nb; j++) {
- if(transponed[i][j] != B[i][j]) {
- razlika++;
- }
- }
- }
- if(razlika == 0) {
- printf("Uslovot e ispolnet");
- }
- else {
- printf("Ne e ispolnet na %d mesta", razlika);
- }
- return 0;
- }
- // niza={7,2,(15),0,3,13,5};
- // 7, 2, 0, 3, 5
- /*
- 7, 2, 0, 0, 3, 0, 5
- nova_niza = {7, 2, 0, 3, 5}
- indeks = 5
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement