void add(int A[][N], int B[][N], int C[][N]){
        int i, j;
        for (i = 0; i < N; i++)
          for (j = 0; j < N; j++)
            C[i][j] = A[i][j] + B[i][j];

      Cpp language logoMatrix Addition

      Cpp recipes

      The add() function takes two arrays as its arguments. The first array, A, is of length N and the second array, B, is of length N. The function will sum the elements in A and B and store the result in C.


        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.