• 11-01-2021, 12:22:26
    #1
    İlk Soru Şu şekilde


    PM atabilirsiniz ücretli veya ücretsiz yardımcı olacak birisini arıyorum.
  • 11-01-2021, 12:57:04
    #2
    mbinbasi adlı üyeden alıntı: mesajı görüntüle
    İlk Soru Şu şekilde

    PM atabilirsiniz ücretli veya ücretsiz yardımcı olacak birisini arıyorum.
    Kalan süre: 1 saat


    Write a complete C program that creates two 4x4 matrices and initialize both using array initializer. Then the program creates the third matrix of the same size and initializes it by copying columns from first and then second matrices in order. (i.e., column 0 taken from the 2nd matrix, column 1 is taken from the 1st matrix, ... etc)
    first ve second dizisini oluşturmada %100 emin değilim ama third oluşturmanın mantığı aşağıdaki şekilde. Hiç bir yerden cevap bulamazsan yazarsın hocam.

    int first[4][4][4][4];
    int second[4][4][4][4];
    int third[4][4][4][4];
    
    for (int i = 0; i < 4; i++) {
    first[i] = 1;
    first[i][i] = 2;
    first[i][i][i] = 3;
    first[i][i][i][i] = 4;
    }
    
    for (int i = 0; i < 4; i++) {
    second[i] = 5;
    second[i][i] = 6;
    second[i][i][i] = 7;
    second[i][i][i][i] = 8;
    }
    
    for (int i = 0; i < 4; i++) {
    third[i] = second[i];
    third[i][i] = first[i][i];
    third[i][i][i] = second[i][i][i];
    third[i][i][i][i] = first[i][i][i][i];
    }
  • 11-01-2021, 13:01:54
    #3
    night_walker adlı üyeden alıntı: mesajı görüntüle
    first ve second dizisini oluşturmada %100 emin değilim ama third oluşturmanın mantığı aşağıdaki şekilde. Hiç bir yerden cevap bulamazsan yazarsın hocam.

    int first[4][4][4][4];
    int second[4][4][4][4];
    int third[4][4][4][4];
    
    for (int i = 0; i < 4; i++) {
    first[i] = 1;
    first[i][i] = 2;
    first[i][i][i] = 3;
    first[i][i][i][i] = 4;
    }
    
    for (int i = 0; i < 4; i++) {
    second[i] = 5;
    second[i][i] = 6;
    second[i][i][i] = 7;
    second[i][i][i][i] = 8;
    }
    
    for (int i = 0; i < 4; i++) {
    third[i] = second[i];
    third[i][i] = first[i][i];
    third[i][i][i] = second[i][i][i];
    third[i][i][i][i] = first[i][i][i][i];
    }
    Çok teşekkür ederim hocam
  • 11-01-2021, 13:26:15
    #4
    mbinbasi adlı üyeden alıntı: mesajı görüntüle
    Çok teşekkür ederim hocam
    önemli değil hocam umarım işinize yaramıştır