criyle/codenet-compile-errors huggingface dataset:
Language: C++

# coding: utf-8

n, m, l = map(int, raw_input().split())
mat_A = [] # (n, m)
mat_B = [] # (m, l)
for i in range(n):
    mat_A.append(map(int, raw_input().split()))

for j in range(m):
    mat_B.append(map(int, raw_input().split()))

for i in range(n):
    c = [0 for g in range(n)]
    for j in range(l):
        for k in range(m):
            c[j] += mat_A[i][k] * mat_B[k][j]
    print " ".join(map(str, c))

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #coding
    1 | # coding: utf-8
      |   ^~~~~~
a.cc:4:12: error: stray '#' in program
    4 | mat_A = [] # (n, m)
      |            ^
a.cc:5:12: error: stray '#' in program
    5 | mat_B = [] # (m, l)
      |            ^
a.cc:3:1: error: 'n' does not name a type
    3 | n, m, l = map(int, raw_input().split())
      | ^
Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] lines = br.readLine().split(" ");
        int n = Integer.parseInt(lines[0]);
        int m = Integer.parseInt(lines[1]);
        int l = Integer.parseInt(lines[2]);
        int[][] matrix1 = new int[n][m];
        int[][] matrix2 = new int[m][l];
        int[][] matrix3 = new int[n][l];
        createMatrix(br, n, m, matrix1);
        createMatrix(br, m, l, matrix2);
        if(n*m*l>=1000000){
            System.out.println("Too Large");
            return;
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<l;j++){
                for(int k=0;k<m;k++){
                    matrix3[i][j]+=matrix1[i][k]*matrix2[k][j];
                }
            }
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<l;j++){
                System.out.print(matrix3[i][j]);
                if(j<l-1)
                    System.out.print(" ");
            }
            
            System.out.println();
        }

    }

    private static void createMatrix(BufferedReader br, int n, int m, int[][] matrix1) throws IOException {
        String[] lines;
        for (int i = 0; i < n; i++) {
            lines = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                matrix1[i][j] = Integer.parseInt(lines[j]);
            }
        }
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class Main {
      | ^~~~~~
Language: C++

// AOJ.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include <cstdio>
#include <iomanip>
using namespace std;
const int M = 100000;
const double pi = 3.141592653589;

int sum(int n, int array[]) {

	int sum = 0;
	for (int i = 0; i < n; i++) {
		sum += array[i];
	}
	return sum;
}

int main(){
	int n, m, l;
	int a[1000][1000] = { 0 }, b[1000][1000] = { 0 };
	double c[1000][1000] = { 0 };

	cin >> n >> m >> l;
	for (int i = 0; i < n; i++) {
		for (int k = 0; k < m; k++) {
			cin >> a[i][k];
		}
	}
	for (int i = 0; i < m; i++) {
		for (int k = 0; k < l; k++) {
			cin >> b[i][k];
		}
	}

	for (int i = 0; i < n; i++) {
		for (int k = 0; k < l; k++) {
			for (int p = 0; p < m; p++) {
				c[i][k] += a[i][p] * b[p][k];
			}
		}
	}
	
	for (int i = 0; i < n; i++) {
		for (int k = 0; k < l; k++) {
			cout << c[i][k];
			if (k == l - 1) cout << endl;
			else cout << " ";
		}
	}
	return 0;
}

Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>

int main(void){
    int n,m,l;
    std::cin>>n>>m>>l;
    int A[n][m],B[m][l],sum=0
    int i,j,k;
    for(i=0;i<n;i++){
        for(j=0;j<m;j++){
            std::cin>>A[i][j];
        }
    }
    for(i=0;i<m;i++){
        for(j=0;j<l;j++){
            std::cin>>B[i][j];
        }
    }
    
    for(i=0;i<n;i++){
        for(j=0;j<l;j++){
        sum=0;
            for(k=0;k<m;k++){
                sum+=A[i][k]*B[k][j];
            }
            if(j)std::cout<<" ";
           std::cout<<sum;
          
        }
        std::cout<<std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected ',' or ';' before 'int'
    7 |     int i,j,k;
      |     ^~~
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     for(i=0;i<n;i++){
      |         ^
a.cc:9:13: error: 'j' was not declared in this scope
    9 |         for(j=0;j<m;j++){
      |             ^
a.cc:13:9: error: 'i' was not declared in this scope
   13 |     for(i=0;i<m;i++){
      |         ^
a.cc:14:13: error: 'j' was not declared in this scope
   14 |         for(j=0;j<l;j++){
      |             ^
a.cc:19:9: error: 'i' was not declared in this scope
   19 |     for(i=0;i<n;i++){
      |         ^
a.cc:20:13: error: 'j' was not declared in this scope
   20 |         for(j=0;j<l;j++){
      |             ^
a.cc:22:17: error: 'k' was not declared in this scope
   22 |             for(k=0;k<m;k++){
      |                 ^
Language: C++

#include<iostream>
using namespace std;

int main(){

  int n,m,l,i,j;

cin >> n >> m >> l;

int matrixA[100][100];
int matrixB[100][100];
int matrixC[100][100];

if(n > )


for(i = 0; i < n; i++){
  for(j = 0; j < l; j++){
  matrixC[i][j] = 0;
  }
}

  for(i = 0; i < n; i++){
    for(j = 0; j < m; j++){
      cin >> matrixA[i][j];
    }
  }
  for(i = 0; i < m; i++){
    for(j = 0; j < l; j++){
      cin >> matrixB[i][j];
    }
  }

  for(i = 0; i < n; i++){
    for(j = 0; j < l; j++){
      for(int k = 0; k < m; k++){
        matrixC[i][j] += matrixA[i][k] * matrixB[k][j];
      }
    }
  }
  for(i = 0; i < n; i++){
    for(j = 0; j < l; j++){
      cout << matrixC[i][j];
      if(j != l-1){
         cout << ' ';
      }
    }
    cout << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: expected primary-expression before ')' token
   14 | if(n > )
      |        ^
Language: C++

#include<iostream>
#include<cmath>
#include<string>
#include<cstdlib>
#include<stdio.h>
#include<cctype>
#include<algorithm>

using namespace std;




int main()
{
	int n,m,l,a[100][100],b[100][100];//n*m,m*l,????????????,n*l
	while(cin>>n>>m>>l)
	{//?????\?¬¬????????°???
		for(int i=1;i<=n;i++)
			for(int k=1;k<=m;k++)
				cin>>a[i][k];
			
		//?????\?¬¬????????°???
		for(int i=1;i<=m;i++)
			for(int k=1;k<=l;k++)
				cin>>b[i][k];
		//????????????
		int c[100][100];//?????????0
		memset(c,0,100*100*sizeof(int));
		for(int i=1;i<=n;i++)
			{
				
				for(int j=1;j<=l;j++)
			
			for(int k=1;k<=m;k++)
				c[i][j]+=a[i][k]*b[k][j];
		
		
		
		
		
		
		}
	
	for(int i=1;i<=n;i++)
		for(int k=1;k<=l;k++)
			{
				cout<<c[i][k];
				if(k!=l)
		cout<<" ";
				if(k==l)
					cout<<endl;
		
		
		}
	




	
	
	
	
	
	
	
	}



}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: 'memset' was not declared in this scope
   29 |                 memset(c,0,100*100*sizeof(int));
      |                 ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include<algorithm>
  +++ |+#include <cstring>
    8 |
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <numeric>
#include <algorithm>
using namespace std;

int main(){
	int n,m,l;
	cin >> n >> m >> l;
	
	int A[100][100];
	int B[100][100];
	int C[100][100];
	
	for(int i=0; i<n; i++){
		for(int j=0; j<m; j++){
			cin >> A[i][j];
		}
	}
	
	for(int i=0; i<m; i++){
		for(int j=0; j<l; j++){
			cin >> B[i][j];
		}
	}
	
	for(int i=0; i<n; i++){
		for(int j=0; j<l; j++){
			C[i][j] = 0;
		}
	}
	
	for(int i=0; i<n; i++){
		for(int j=0; j<l; j++){
			for(int k=0; k<m; k++){
				C[i][j] += A[i][k]*B[k][j];
			}
		}
	}
	
	for(int i=0;i<n;i++){
		for(int j=0;j<l;j++){
			if(j!=l) cout << C[i][j] << ' ';
			else cout << [i][j] << endl;
		}
	}
}

Compiler output:
a.cc: In lambda function:
a.cc:46:41: error: expected '{' before '[' token
   46 |                         else cout << [i][j] << endl;
      |                                         ^
a.cc: In function 'int main()':
a.cc:46:41: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int')
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int n, m, l;
	long long A[100][100];
	long long B[100][100];
	long long C[100][100];

	cin >> n >> m >> l;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < m; j++) cin >> A[i][j];
	}
	for (int i = 0; i < m; i++) {
		for (int j = 0; j < l; j++) cin >> B[i][j];
	}

	for (int i = 0; i < m; i++) {
		for (int j = 0; j < l; j++) {
			c[i][j] = 0;
			for (int k = 0; k < m; k++) {
				c[i][j] = A[i][k] * B[k][j];
			}
		}
	}

	for (int i = 0; i < m; i++) {
		for (int j = 0; j < l; j++) {
			if (j) cout << " ";//j=0????????\?????????????????????
			cout << C[i][j];
		}
		cout << endl;
	}

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: 'c' was not declared in this scope
   21 |                         c[i][j] = 0;
      |                         ^
Language: C++

#include <iostream>

int main() {
        int n, m, l;
        std::cin >> n >> m >> l;
        std::cout << std::endl;
        std::cout << n << ' ' << m << ' ' << l;
        int a[n][m], b[m][l], c[n][l];

        for(int i=0; i<n; i++){
                for(int j=0; j<m; j++){
                        std::cin >> a[i][j];
                }
        }

        for(int j=0; j<m; j++){
                for(int k=0; k<l; k++){
                        std::cin >> b[j][k];
                }
        }

        for(int i=0; i<n; i++){
                for(int k=0; k<l; k++){
                        int sum = 0;
                        for(int j=0; j<m; j++){
                                sum += a[i][j] * b[j][k];
                                std::cout << a[i][j] * b[j][k] << std::endl;
                        }
                        c[i][k] = sum;
                }
        }

        for(int i=0; i<n; i++){
                for(int k=0; k<l; k++){
                        std::cout << c[i][k] << ' ' << std::flush;
                        else if(k==l-1)std::cout << std::endl;
                }
        }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:25: error: 'else' without a previous 'if'
   36 |                         else if(k==l-1)std::cout << std::endl;
      |                         ^~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int n, m, l;
	int i, j, k;
	int A[100][100] = { 0 };
	int B[100][100] = { 0 };
	int C[100][100] = { 0 };

	cin >> n >> m >> l;

	//行列Aの値入力
	for (i = 0; i < n; i++)
	{
		for (j = 0; j < m; j++)
		{
			cin >> A[i][j];
		}
	}
	//行列Bの値入力
	for (j = 0; j < m; j++)
	{
		for (k = 0; k < l; k++)
		{
			cin >> B[j][k];
		}
	}

	//A * B
	for (i = 0; i < n; i++)
	{
		for (k = 0; k < l; k++)
		{
			for (j = 0; j < m; j++)
			{
				C[i][k] += A[i][j] * B[j][k];
			}
			cout << C[i][k] << " ";
		}
		cout << "\n";
	｝

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:9: error: '\U0000ff5d' was not declared in this scope
   43 |         ｝
      |         ^~
a.cc:46:2: error: expected '}' at end of input
   46 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

import com.sun.javafx.geom.Matrix3f;

import java.util.Scanner;
import java.util.function.Function;

public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    Scanner sc = new Scanner(System.in);

    void solve() {
        int n, m, l;
        int[][] m1, m2, m3;
        n = sc.nextInt();
        m = sc.nextInt();
        l = sc.nextInt();
        m1 = new int[n][];
        for (int i = 0; i < n; ++i) {
            m1[i] = new int[m];
            for (int j = 0; j < m; ++j) {
                m1[i][j] = sc.nextInt();
            }
        }
        m2 = new int[m][];
        for (int i = 0; i < m; ++i) {
            m2[i] = new int[l];
            for (int j = 0; j < l; ++j) {
                m2[i][j] = sc.nextInt();
            }
        }
        m3 = new int[n][];
        for (int i = 0; i < n; ++i) {
            m3[i] = new int[l];
            for (int j = 0; j < l; ++j) {
                int temp = 0;
                for (int k = 0; k < m; ++k) {
                    temp += m1[i][k] * m2[k][j];
                }
                m3[i][j] = temp;
            }
        }

        for (int i = 0; i < n; ++i) {
            for (int j = 0; j < l - 1; ++j) {
                System.out.print(m3[i][j] + " ");
            }
            System.out.println(m3[i][l - 1]);
        }

    }

}




Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import com.sun.javafx.geom.Matrix3f;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.Scanner;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.function.Function;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

include <iostream>
using namespace std;
int main()
{
	int n, m, l;
	int nm[100][100];
	int ml[100][100];
	int C[100][100];
	cin >> n >> m >> l;

	// n x m
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < m; j++)
		{
			nm[i][j] = 0;
			cin >> nm[i][j];
		}
	}
	//m x l
	for (int i = 0; i < m; i++)
	{
		for (int j = 0; j < l; j++)
		{
			ml[i][j] = 0;
			cin >> ml[i][j];
		}
	}

	// n x l
	for(int i = 0 ; i < n; i++)
	{
		for (int j = 0; j < l; j++)
		{
			C[i][j] = 0;
		}
	}
	for (int i = 0; i < n ; i++)
	{
		for (int j = 0; j < l; j++)
		{
			for(int k = 0;  k < m ; k++)
			{
				C[i][j] += nm[i][k] * ml[k][j];
			}
		}
	}

	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < l; j++)
		{
			cout << C[i][j];
			if(j < l)
			{
				cout << " ";
			}
		}
		cout << endl;
	}
	return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin >> n >> m >> l;
      |         ^~~
a.cc:53:25: error: 'cout' was not declared in this scope
   53 |                         cout << C[i][j];
      |                         ^~~~
a.cc:59:17: error: 'cout' was not declared in this scope
   59 |                 cout << endl;
      |                 ^~~~
a.cc:59:25: error: 'endl' was not declared in this scope
   59 |                 cout << endl;
      |                         ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n,m,l,A[100][100],B[100][100],
	long long int C[100][100]={};
	cin>>n>>m>>l;
	for(int i=0;i<n;i++){
		for(int j=0;j<m;j++){
			cin>>A[i][j];
		}
	}
	for(int i=0;i<m;i++){
		for(int j=0;j<l;j++){
			cin>>B[i][j];
		}
	}
	for(int i=0;i<n;i++){
		for(int k=0;k<m;k++){
			for(int j=0;j<l;j++){
				C[i][j]+=A[i][k]*B[k][j];
			}
			
		}
	}
	for(int i=0;i<n;i++){
		for(int j=0;j<l;j++){
			cout<<C[i][j];
			if(j!=l-1)cout<<" ";
		}
		cout<<endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected unqualified-id before 'long'
    6 |         long long int C[100][100]={};
      |         ^~~~
a.cc:21:33: error: 'C' was not declared in this scope
   21 |                                 C[i][j]+=A[i][k]*B[k][j];
      |                                 ^
a.cc:28:31: error: 'C' was not declared in this scope
   28 |                         cout<<C[i][j];
      |                               ^
Language: C++

#include <stdio.h>
#define rep(i, a) for(int i = 0; i < a; ++i)

trpedef long long ll;

int main(void) {
  ll i, j, k, n, m, l;
  scanf("%lld%lld%lld", &n, &m, &l);
  ll a[n][m], b[m][l], c[n][l];
  rep(i, n) rep(j, m) scanf("%lld", &a[i][j]);
  rep(i, m) rep(j, l) scanf("%lld", &b[i][j]);
  rep(i, n) rep(j, l) c[i][j] = 0;
  rep(i, n) rep(j, l) rep(k, m) c[i][j] += a[i][k] * b[k][j];
  rep(i, n) rep(j, l) {
    if(j != l - 1) printf("%lld ", c[i][j]);
    else printf("%lld\n", c[i][j]);
  }
  return 0;
}


Compiler output:
a.cc:4:1: error: 'trpedef' does not name a type; did you mean 'typedef'?
    4 | trpedef long long ll;
      | ^~~~~~~
      | typedef
a.cc: In function 'int main()':
a.cc:7:3: error: 'll' was not declared in this scope
    7 |   ll i, j, k, n, m, l;
      |   ^~
a.cc:8:26: error: 'n' was not declared in this scope
    8 |   scanf("%lld%lld%lld", &n, &m, &l);
      |                          ^
a.cc:8:30: error: 'm' was not declared in this scope
    8 |   scanf("%lld%lld%lld", &n, &m, &l);
      |                              ^
a.cc:8:34: error: 'l' was not declared in this scope
    8 |   scanf("%lld%lld%lld", &n, &m, &l);
      |                                  ^
a.cc:9:5: error: expected ';' before 'a'
    9 |   ll a[n][m], b[m][l], c[n][l];
      |     ^~
      |     ;
a.cc:10:38: error: 'a' was not declared in this scope
   10 |   rep(i, n) rep(j, m) scanf("%lld", &a[i][j]);
      |                                      ^
a.cc:11:38: error: 'b' was not declared in this scope
   11 |   rep(i, m) rep(j, l) scanf("%lld", &b[i][j]);
      |                                      ^
a.cc:12:23: error: 'c' was not declared in this scope
   12 |   rep(i, n) rep(j, l) c[i][j] = 0;
      |                       ^
a.cc:13:33: error: 'c' was not declared in this scope
   13 |   rep(i, n) rep(j, l) rep(k, m) c[i][j] += a[i][k] * b[k][j];
      |                                 ^
a.cc:13:44: error: 'a' was not declared in this scope
   13 |   rep(i, n) rep(j, l) rep(k, m) c[i][j] += a[i][k] * b[k][j];
      |                                            ^
a.cc:13:54: error: 'b' was not declared in this scope
   13 |   rep(i, n) rep(j, l) rep(k, m) c[i][j] += a[i][k] * b[k][j];
      |                                                      ^
a.cc:15:36: error: 'c' was not declared in this scope
   15 |     if(j != l - 1) printf("%lld ", c[i][j]);
      |                                    ^
a.cc:16:27: error: 'c' was not declared in this scope
   16 |     else printf("%lld\n", c[i][j]);
      |                           ^
Language: C++

#include <stdio.h>

int main() {
	int n[3];
	int a[100][100], b[100][100];

	for (int i = 0; i < 3; i++) {
		scanf("%d",&n[i]);
	}

	int i, j, k;
	
	for (i = 0; i < n[0]; i++)for (k = 0; k < n[1];k++) {
		scanf("%d", &a[i][k]);
	}
	for (k = 0; k < n[1]; k++)for (j = 0; j < n[2]; j++) {
		scanf("%d", &b[k][j]);
	}


	for (i = 0; i < n[0]; i++) {
		for (j = 0; j < n[2]; j++) {
			__int64 tmp = 0;
			for (k = 0; k < n[1]; k++) {
				tmp += a[i][k] * b[k][j];
			}
			printf("%lld", tmp);
			if (j == n[2] - 1)break;
			printf(" ");
		}
		printf("\n");
	}


	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:25: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   23 |                         __int64 tmp = 0;
      |                         ^~~~~~~
      |                         __int64_t
a.cc:25:33: error: 'tmp' was not declared in this scope
   25 |                                 tmp += a[i][k] * b[k][j];
      |                                 ^~~
a.cc:27:40: error: 'tmp' was not declared in this scope
   27 |                         printf("%lld", tmp);
      |                                        ^~~
Language: C++

#include <stdio.h>

int main(void)
{
	int   i, j, k , a[100][100], b[100][100], c[100][100], n, m, l, sum, tem ;
	
	scanf("%d %d %d", &n, &m, &l);

	for (i = 0; i < n; i++) {
		for (j = 0; j < l; j++) {
			c[i][j] = 0;
		}
	}


	for (i = 0; i < n; i++) {
		for (j = 0; j < m; j++) {
			scanf("%d", &a[i][j]);
		}
	}

	for (i = 0; i < m; i++) {
		for (j = 0; j < l; j++) {
			scanf("%d", &b[i][j]);
		}
	}

	for (i = 0; i < n; i++) {
		for (j = 0; j < l; j++) {
			for (k = 0; k < m; k++) {
				c[i][j] = a[i][k] * b[k][j] + c[i][j];
			}
			
		}
	}

	for (i = 0; i < n; i++) {
		for (j = 0; j < l; j++) {
                       if( j == l -1 ){
                        printf("%d ", c[i][j]);
else
			printf("%d ", c[i][j]);
		}
		printf("\n");
	}

	
		
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:1: error: expected '}' before 'else'
   41 | else
      | ^~~~
a.cc:39:39: note: to match this '{'
   39 |                        if( j == l -1 ){
      |                                       ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    long long n,m,l,sum;
    cin>>n>>m>>l;
     a[n][m], b[m][l];
    for (int i=0; i<n; i++) for (int j=0; j<m; j++) cin>>a[i][j];
    for (int i=0; i<m; i++) for (int j=0; j<l; j++) cin>>b[i][j];
    for (int i=0; i<n; i++)
    {
        for (int j=0; j<l; j++)
        {
            sum=0;
            for (int k=0; k<m; k++)
            {
                sum+=a[i][k]*b[k][j];
            }
            cout<<sum; if (j!=l-1) cout<<' ';
        }
        cout<<'\n';
    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'a' was not declared in this scope
    9 |      a[n][m], b[m][l];
      |      ^
a.cc:9:15: error: 'b' was not declared in this scope
    9 |      a[n][m], b[m][l];
      |               ^
Language: C++

#include <iostream>


void matrix_multiple(int A[100][100], int B[100][100],
                     int n, int m, int l, long int C[100][100]) {
  for (int i = 0; i < n; i ++) {
    for (int j = 0; j < l; j ++) {
      for (int k = 0; k < m; k ++) {
        C[i][j] += A[i][k] * B[k][j];
      }
    }
  }
}


int main() {
  int n, m, l;
  int A[100][100], B[100][100];
  long int C[100][100] = 0;
  char deli = ' ';

  std::cin >> n >> m >> l;
  for (int i = 0; i < n; i ++) {
    for (int j = 0; j < m; j ++) {
      std::cin >> A[i][j];
    }
  }

  for (int i = 0; i < m; i ++) {
    for (int j = 0; j < l; j ++) {
      std::cin >> B[i][j];
    }
  }

  matrix_multiple(A, B, n, m, l, C);

  for (int i = 0; i < n; i ++) {
    for (int j = 0; j < l - 1; j ++) {
      std::cout << C[i][j] << deli;
    }
    std::cout << C[i][l-1] << std::endl;
  }

  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:19:26: error: array must be initialized with a brace-enclosed initializer
   19 |   long int C[100][100] = 0;
      |                          ^
Language: C++

#include<cstdio>
using namespace std;
int main(){
    int n,m,l;
    scanf("%d %d %d",&n,&m,&l);
    longlong A[n][m],B[m][l],C[n][l];
    for(int i=0;i<n;i++){
        for(int j=0;j<m;j++){
            scanf(" %ld",&A[i][j]);
        }
    }
    for(int i=0;i<m;i++){
        for(int j=0;j<l;j++){
            scanf(" %ld",&B[i][j]);
        }
    }
    for(int i=0;i<n;i++){
        for(int j=0;j<l;j++){
            int sum=0;
            for(int k=0;k<m;k++){
                sum+=A[i][k]*B[k][j];
            }
            C[i][j]=sum;
        }
    }
    for(int i=0;i<n;i++){
        for(int j=0;j<l;j++){
           printf("%d",C[i][j]);
           if(j!=l-1){
               printf(" ");
           }
        }
        printf("\n");
    }
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'longlong' was not declared in this scope
    6 |     longlong A[n][m],B[m][l],C[n][l];
      |     ^~~~~~~~
a.cc:9:27: error: 'A' was not declared in this scope
    9 |             scanf(" %ld",&A[i][j]);
      |                           ^
a.cc:14:27: error: 'B' was not declared in this scope
   14 |             scanf(" %ld",&B[i][j]);
      |                           ^
a.cc:21:22: error: 'A' was not declared in this scope
   21 |                 sum+=A[i][k]*B[k][j];
      |                      ^
a.cc:21:30: error: 'B' was not declared in this scope
   21 |                 sum+=A[i][k]*B[k][j];
      |                              ^
a.cc:23:13: error: 'C' was not declared in this scope
   23 |             C[i][j]=sum;
      |             ^
a.cc:28:24: error: 'C' was not declared in this scope
   28 |            printf("%d",C[i][j]);
      |                        ^
Language: C++

#include<cstdio>
using namespace std;
int main(){
    int n,m,l;
    scanf("%d %d %d",&n,&m,&l);
    longlong A[n][m],B[m][l],C[n][l];
    for(int i=0;i<n;i++){
        for(int j=0;j<m;j++){
            scanf(" %lld",&A[i][j]);
        }
    }
    for(int i=0;i<m;i++){
        for(int j=0;j<l;j++){
            scanf(" %lld",&B[i][j]);
        }
    }
    for(int i=0;i<n;i++){
        for(int j=0;j<l;j++){
            int sum=0;
            for(int k=0;k<m;k++){
                sum+=A[i][k]*B[k][j];
            }
            C[i][j]=sum;
        }
    }
    for(int i=0;i<n;i++){
        for(int j=0;j<l;j++){
           printf("%d",C[i][j]);
           if(j!=l-1){
               printf(" ");
           }
        }
        printf("\n");
    }
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'longlong' was not declared in this scope
    6 |     longlong A[n][m],B[m][l],C[n][l];
      |     ^~~~~~~~
a.cc:9:28: error: 'A' was not declared in this scope
    9 |             scanf(" %lld",&A[i][j]);
      |                            ^
a.cc:14:28: error: 'B' was not declared in this scope
   14 |             scanf(" %lld",&B[i][j]);
      |                            ^
a.cc:21:22: error: 'A' was not declared in this scope
   21 |                 sum+=A[i][k]*B[k][j];
      |                      ^
a.cc:21:30: error: 'B' was not declared in this scope
   21 |                 sum+=A[i][k]*B[k][j];
      |                              ^
a.cc:23:13: error: 'C' was not declared in this scope
   23 |             C[i][j]=sum;
      |             ^
a.cc:28:24: error: 'C' was not declared in this scope
   28 |            printf("%d",C[i][j]);
      |                        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,m,l;
    cin>>n>>m>>l;
    
    int a[100][100];
    for(int i=0;i<n;i++)
        for(int j=0;j<m;j++) cin>>a[i][j];
    
    int b[100][100];
    for(int i=0;i<m;i++)
        for(int j=0;j<l;l++) cin>>b[i][j];
    
    long long c[100][100] = {};
    for(int i=0;i<n;i++)
        for(int j=0;j<l;j++)
            for(int k=0;k<m;k++) c[i][j] += a[i][k] * b[k][j];
    
    for(int i=0;i<n;i++){
        for(int j=0;j<l;j++){
            if(j) cout<<" ";
            cout<<c[i][j];
        }
        cout<<endl;
    }
    reurn 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:5: error: 'reurn' was not declared in this scope
   27 |     reurn 0;
      |     ^~~~~
Language: C++

#include <bits/stdc++>
using namespace std;

int main(){
    int n,m,l;
    cin >>n>>m>>l;

    int a[100][100];
    for(int i=0;i<n;i++)
       for(int j =0;j<m;j++) cin >> a[i][j];

    int b[100][100];
    for(int i =0;i<m;i++)
       for(intj =0;j<l;j++) cin >>a[i][j];

     long long c[100][100] ={};
     for (int i=0;i<n;i++)
         for(int j =0;j<l;j++)
             for(int k =0;k<m;k++) c[i][j]+-a[i][k]*b[k][j];

     for(int i=0;i<n;i++){
         for(int j =0;j<l;j++){
          if(j) cout<<" ";
         }
         cout<<c[i][j];
         }
     cout <<endl;
}
         return 0;
}


Compiler output:
a.cc:1:10: fatal error: bits/stdc++: No such file or directory
    1 | #include <bits/stdc++>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    int n,m,l;
    cin >>n>>m>>l;

    int a[100][100];
    for(int i=0;i<n;i++)
       for(int j =0;j<m;j++) cin >> a[i][j];

    int b[100][100];
    for(int i =0;i<m;i++)
       for(intj =0;j<l;j++) cin >>a[i][j];

     long long c[100][100] ={};
     for (int i=0;i<n;i++)
         for(int j =0;j<l;j++)
             for(int k =0;k<m;k++) c[i][j]+-a[i][k]*b[k][j];

     for(int i=0;i<n;i++){
         for(int j =0;j<l;j++){
          if(j) cout<<" ";
         }
         cout<<c[i][j];
         }
     cout <<endl;
}
         return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'intj' was not declared in this scope; did you mean 'int'?
   14 |        for(intj =0;j<l;j++) cin >>a[i][j];
      |            ^~~~
      |            int
a.cc:14:20: error: 'j' was not declared in this scope
   14 |        for(intj =0;j<l;j++) cin >>a[i][j];
      |                    ^
a.cc:25:21: error: 'j' was not declared in this scope
   25 |          cout<<c[i][j];
      |                     ^
a.cc: At global scope:
a.cc:29:10: error: expected unqualified-id before 'return'
   29 |          return 0;
      |          ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    int n,m,l;
    cin >>n>>m>>l;

    int a[100][100];
    for(int i=0;i<n;i++)
       for(int j =0;j<m;j++) cin >> a[i][j];

    int b[100][100];
    for(int i =0;i<m;i++)
       for(intj =0;j<l;j++) cin >>b[i][j];

     long long c[100][100] ={};
     for (int i=0;i<n;i++)
         for(int j =0;j<l;j++)
             for(int k =0;k<m;k++) c[i][j]+=a[i][k]*b[k][j];

     for(int i=0;i<n;i++){
         for(int j =0;j<l;j++){
          if(j) cout<<" ";
          cout <<c[i][j];
         }
         cout<<c[i][j];
         }
     cout <<endl;
}
         return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'intj' was not declared in this scope; did you mean 'int'?
   14 |        for(intj =0;j<l;j++) cin >>b[i][j];
      |            ^~~~
      |            int
a.cc:14:20: error: 'j' was not declared in this scope
   14 |        for(intj =0;j<l;j++) cin >>b[i][j];
      |                    ^
a.cc:26:21: error: 'j' was not declared in this scope
   26 |          cout<<c[i][j];
      |                     ^
a.cc: At global scope:
a.cc:30:10: error: expected unqualified-id before 'return'
   30 |          return 0;
      |          ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    int n,m,l;
    cin >>n>>m>>l;

    int a[100][100];
    for(int i=0;i<n;i++)
       for(int j =0;j<m;j++) cin >> a[i][j];

    int b[100][100];
    for(int i =0;i<m;i++)
       for(int j =0;j<l;j++) cin >>b[i][j];

     long long c[100][100] ={};
     for (int i=0;i<n;i++)
         for(int j =0;j<l;j++)
             for(int k =0;k<m;k++) c[i][j]+=a[i][k]*b[k][j];

     for(int i=0;i<n;i++){
         for(int j =0;j<l;j++){
          if(j) cout<<" ";
          cout <<c[i][j];
         }
         cout<<c[i][j];
         }
     cout <<endl;
}
         return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:21: error: 'j' was not declared in this scope
   26 |          cout<<c[i][j];
      |                     ^
a.cc: At global scope:
a.cc:30:10: error: expected unqualified-id before 'return'
   30 |          return 0;
      |          ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    int n,m,l;
    cin >>n>>m>>l;

    int a[100][100];
    for(int i=0;i<n;i++)
       for(int j =0;j<m;j++) cin >> a[i][j];

    int b[100][100];
    for(int i =0;i<m;i++)
       for(int j =0;j<m;j++) cin >>b[i][j];

     long long c[100][100] ={};
     for (int i=0;i<n;i++)
         for(int j =0;j<l;j++)
             for(int k =0;k<m;k++) c[i][j]+=a[i][k]*b[k][j];

     for(int i=0;i<n;i++){
         for(int j =0;j<l;j++){
          if(j) cout<<" ";
          cout <<c[i][j];
         }
         cout<<c[i][j];
    }
     cout <<endl;
}
         return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:21: error: 'j' was not declared in this scope
   26 |          cout<<c[i][j];
      |                     ^
a.cc: At global scope:
a.cc:30:10: error: expected unqualified-id before 'return'
   30 |          return 0;
      |          ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    int n,m,l;
    cin >>n>>m>>l;

    int a[100][100];
    for(int i=0;i<n;i++)
       for(int j =0;j<m;j++) cin >> a[i][j];

    int b[100][100];
    for(int i =0;i<m;i++)
       for(int j =0;j<l;j++) cin >>b[i][j];

     long long c[100][100] ={};
     for (int i=0;i<n;i++)
         for(int j =0;j<l;j++)
             for(int k =0;k<m;k++) c[i][j]+=a[i][k]*b[k][j];

     for(int i=0;i<n;i++){
         for(int j =0;j<l;j++){
          if(j) cout<<" ";
          cout <<c[i][j];
         }
         cout<<c[i][j];
    }
     cout <<endl;
    }
         return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:21: error: 'j' was not declared in this scope
   26 |          cout<<c[i][j];
      |                     ^
a.cc: At global scope:
a.cc:30:10: error: expected unqualified-id before 'return'
   30 |          return 0;
      |          ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    int n,m,l;
    cin >>n>>m>>l;

    int a[100][100];
    for(int i=0;i<n;i++)
       for(int j =0;j<m;j++) cin >> a[i][j];

    int b[100][100];
    for(int i =0;i<m;i++)
       for(int j =0;j<l;j++) cin >>b[i][j];

     long long c[100][100] ={};
     for (int i=0;i<n;i++)
         for(int j =0;j<l;j++)
             for(int k =0;k<m;k++) c[i][j]+=a[i][k]*b[k][j];

     for(int i=0;i<n;i++){
         for(int j =0;j<l;j++){
          if(j) cout<<" ";
          cout <<c[i][j];
         }
      cout <<endl;  
    }
    
    }
         return 0;
}


Compiler output:
a.cc:30:10: error: expected unqualified-id before 'return'
   30 |          return 0;
      |          ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
 int n,m,l;
 cin>>n>>m>>l;

 int a[100][100];
 for(int i=0;i<n;i++)
  for(int j=0;j<m;j++) cin>>a[i][j];

 int b[100][100];
 for(int i=0;i<m;i++)
  for(int j=0;j<l;j++) cin..b[i][j];
 
 long long c[100][100] = {};
 for(int i=0;i<n;i++)
  for(int j=0;j<l;j++){
     if(j) cout<<" ";
     cout<<c[i][j];
   }
   cout<<endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: expected unqualified-id before '.' token
   15 |   for(int j=0;j<l;j++) cin..b[i][j];
      |                            ^
a.cc: At global scope:
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

#include<stdio.h>
int main()
{
    int n,m,l,i,j,k;
    scanf("%d %d %d",&n,&m,&l);
    int x[n][m],y[m][l]
    long long s=0,z[n][l];
    for(i=0;i<n;i++)
    {
        for(j=0;j<m;j++)
        {
            scanf("%d",&x[i][j]);
        }
    }
    for(i=0;i<m;i++)
    {
        for(j=0;j<l;j++)
        {
            scanf("%d",&y[i][j]);
        }
    }
    for(i=0;i<n;i++)
    {
        for(j=0;j<l;j++)
        {
            for(k=0;k<m;k++)
            {
                s=s+x[i][k]*y[k][j];
            }
            z[i][j]=s;
            s=0;
        }
    }
    for(i=0;i<n;i++)
    {
        for(j=0;j<l-1;j++)
        {
            printf("%lld ",z[i][j]);
        }
        for(j=l-1;j<l;j++)
        {
            printf("%lld\n",z[i][j]);
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'long'
    7 |     long long s=0,z[n][l];
      |     ^~~~
a.cc:19:25: error: 'y' was not declared in this scope
   19 |             scanf("%d",&y[i][j]);
      |                         ^
a.cc:28:17: error: 's' was not declared in this scope
   28 |                 s=s+x[i][k]*y[k][j];
      |                 ^
a.cc:28:29: error: 'y' was not declared in this scope
   28 |                 s=s+x[i][k]*y[k][j];
      |                             ^
a.cc:30:13: error: 'z' was not declared in this scope
   30 |             z[i][j]=s;
      |             ^
a.cc:30:21: error: 's' was not declared in this scope
   30 |             z[i][j]=s;
      |                     ^
a.cc:38:28: error: 'z' was not declared in this scope
   38 |             printf("%lld ",z[i][j]);
      |                            ^
a.cc:42:29: error: 'z' was not declared in this scope
   42 |             printf("%lld\n",z[i][j]);
      |                             ^
Language: C++

#include <cstdio>

int main()
{
    int n, m, l;
    int i, j, k;
    int a[101][101], b[101][101], ;
    long c[101][101];
    scanf("%d %d %d", &n, &m, &l);
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < m; j++)
        {
            scanf("%d", &a[i][j]);
        }
    }
    for (i = 0; i < m; i++)
    {
        for (j = 0; j < l; j++)
        {
            scanf("%d", &b[i][j]);
        }
    }
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < l; j++) //cの配列
        {
            c[i][j] = 0;
            for (k = 0; k < m; k++)
            {
                c[i][j] += (a[i][k] * b[k][j]);
            }
            if (j == l - 1)
            {
                printf("%d", c[i][j]);
            }
            else
            {
                printf("%d ", c[i][j]);
            }
        }
        printf("\n");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: expected unqualified-id before ';' token
    7 |     int a[101][101], b[101][101], ;
      |                                   ^
Language: C++

#include <cstdio>

int main()
{
    int n, m, l;
    int i, j, k;
    int a[101][101], b[101][101], ;
    long long c[101][101];
    scanf("%d %d %d", &n, &m, &l);
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < m; j++)
        {
            scanf("%d", &a[i][j]);
        }
    }
    for (i = 0; i < m; i++)
    {
        for (j = 0; j < l; j++)
        {
            scanf("%d", &b[i][j]);
        }
    }
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < l; j++) //cの配列
        {
            c[i][j] = 0;
            for (k = 0; k < m; k++)
            {
                c[i][j] += (a[i][k] * b[k][j]);
            }
            if (j == l - 1)
            {
                printf("%d", c[i][j]);
            }
            else
            {
                printf("%d ", c[i][j]);
            }
        }
        printf("\n");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: expected unqualified-id before ';' token
    7 |     int a[101][101], b[101][101], ;
      |                                   ^
Language: C++

#include <cstdio>

int main()
{
    int n, m, l;
    int i, j, k;
    int a[101][101], b[101][101], ;
    long c[101][101];
    scanf("%d %d %d", &n, &m, &l);
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < m; j++)
        {
            scanf("%d", &a[i][j]);
        }
    }
    for (i = 0; i < m; i++)
    {
        for (j = 0; j < l; j++)
        {
            scanf("%d", &b[i][j]);
        }
    }
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < l; j++) //cの配列
        {
            c[i][j] = 0;
            for (k = 0; k < m; k++)
            {
                c[i][j] += (a[i][k] * b[k][j]);
            }
            if (j == l - 1)
            {
                printf("%ld", c[i][j]);
            }
            else
            {
                printf("%ld ", c[i][j]);
            }
        }
        printf("\n");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: expected unqualified-id before ';' token
    7 |     int a[101][101], b[101][101], ;
      |                                   ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n, m, l;
    cin>>n>>m>>l;
    int a[101][101], b[101][101], c[101][101];
    for(int i=0;i<n;i++)
        for(int j=0;j<m;j++){
            cin>>a[i][j];
        }
    for(int i=0;i<m;i++)
        for(int j=0;j<l;j++){
            cin>>b[i][j];
        }
    for(int i=0;i<n;i++)
        for(int j=0;j<l;j++)
            for(int k=0;k<m;k++){
                c[i][j] += a[i][k] * b[k][j];
            }
    for(int i=0;i<n;i++){
        for(int j=0;j<l;j++){
            if(j) cout<<" ";
            cout<<c[i][j];
        }
        cout<<endl
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:25:19: error: expected ';' before '}' token
   25 |         cout<<endl
      |                   ^
      |                   ;
   26 |     }
      |     ~
Language: C++

#include <iostream>
#include <vector>
using namespace std;

static inline vector<vector<long>> read(vector<vector<long>> v) {
    for (auto &x: v)
        for (long &y : x)
            cin >> y;
    return move(v);
}

long main(void)
{
    long n, m, l;
    cin >> n >> m >> l;
    vector<vector<long>> a(n, vector<long>(m));
    vector<vector<long>> b(m, vector<long>(l));
    a = read(move(a));
    b = read(move(b));

    for (long i = 0; i < n; i++) {
        for (long j = 0; j < l; j++) {
            long sum = 0;
            for (long k = 0; k < m; k++)
                sum += a[i][k] * b[k][j];
            if (j)
                cout << " ";
            cout << sum;
        }
        cout << endl;
    }

    return 0;
}



Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <stdio.h>


int main() {
int A[101][101],B[101][101];
int n,m,l;
scanf("%d %d %d",&n,&m,&l);
for(int i=0;i<n;i++){
	for(int j=0;j<m;j++){
		scanf("%d",&A[i][j]);
	}
}
for(int i=0;i<m;i++){
	for(int j=0;j<l;j++){
		scanf("%d",&B[i][j]);
	}
}
int ans;
for(int i=0;i<n;i++){
	for(int j=0;j<l;j++){
		ans=0;
		for(int k=0;k<m;k++){
			c+=A[i][k]*B[k][j];
		}
		if(j>0)printf(" ");
		printf("%d",ans);
	}
	printf("\n");
}

return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:23:25: error: 'c' was not declared in this scope
   23 |                         c+=A[i][k]*B[k][j];
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    int n, m, l;
    cin >> n >> m >> l;
    int A[n][m], B[m][l], C[n][l];
    for(int i = 0; i < n; i++){
        for(int j = 0; j < m; j++){
            cin >> A[i][j];
        }
    }
    for(int i = 0; i < m; i++){
        for(int j = 0; j < l; j++){
            cin >> A[i][j];
        }
    }
    for(int k - 0; k < m; k++){
        for(int i = 0; i < n; i++){
            for(int j = 0; j < l; j++){
                C[i][j] = A[i][k] * B[k][j];
            }
        }
    }
    for(int i = 0; i < n; i++){
        for(int j = 0; j < l; j++){
            if(j > 0) cout << " ";
            cout << C[i][j];
        }
        cout << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: expected ';' before '-' token
   18 |     for(int k - 0; k < m; k++){
      |              ^~
      |              ;
a.cc:18:25: error: expected ')' before ';' token
   18 |     for(int k - 0; k < m; k++){
      |        ~                ^
      |                         )
a.cc:18:27: error: 'k' was not declared in this scope
   18 |     for(int k - 0; k < m; k++){
      |                           ^
Language: C++

	cin >> a >> b >> c ;
	
	vector<vector<int>> vec1,vec2;
	
	vec1 = vector<vector<int>>(a, vector<int>(b, 0));
	vec2 = vector<vector<int>>(b, vector<int>(c, 0));
	
	
	for(int i=0; i<a; i++){
		for(int j = 0; j<b; j++){
			cin >> vec1.at(i).at(j);
		}
	}
	
	for(int i=0; i<b; i++){
		for(int j = 0; j<c; j++){
			cin >> vec2.at(i).at(j);
		}
	}
	
	for(int i = 0; i<a; i++){
		for(int j=0; j<c; j++){
			x=0;
			for(int k=0; k<b; k++){
				x = x + vec1.at(i).at(k)*vec2.at(k).at(j);
			}
			cout << x << " ";
			//if (j != c) cout << " " ;
		}
		 cout << endl;
	}
	cout << endl;
}



Compiler output:
a.cc:1:9: error: 'cin' does not name a type
    1 |         cin >> a >> b >> c ;
      |         ^~~
a.cc:3:9: error: 'vector' does not name a type
    3 |         vector<vector<int>> vec1,vec2;
      |         ^~~~~~
a.cc:5:9: error: 'vec1' does not name a type
    5 |         vec1 = vector<vector<int>>(a, vector<int>(b, 0));
      |         ^~~~
a.cc:6:9: error: 'vec2' does not name a type
    6 |         vec2 = vector<vector<int>>(b, vector<int>(c, 0));
      |         ^~~~
a.cc:9:9: error: expected unqualified-id before 'for'
    9 |         for(int i=0; i<a; i++){
      |         ^~~
a.cc:9:22: error: 'i' does not name a type
    9 |         for(int i=0; i<a; i++){
      |                      ^
a.cc:9:27: error: 'i' does not name a type
    9 |         for(int i=0; i<a; i++){
      |                           ^
a.cc:15:9: error: expected unqualified-id before 'for'
   15 |         for(int i=0; i<b; i++){
      |         ^~~
a.cc:15:22: error: 'i' does not name a type
   15 |         for(int i=0; i<b; i++){
      |                      ^
a.cc:15:27: error: 'i' does not name a type
   15 |         for(int i=0; i<b; i++){
      |                           ^
a.cc:21:9: error: expected unqualified-id before 'for'
   21 |         for(int i = 0; i<a; i++){
      |         ^~~
a.cc:21:24: error: 'i' does not name a type
   21 |         for(int i = 0; i<a; i++){
      |                        ^
a.cc:21:29: error: 'i' does not name a type
   21 |         for(int i = 0; i<a; i++){
      |                             ^
a.cc:32:9: error: 'cout' does not name a type
   32 |         cout << endl;
      |         ^~~~
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

#include <cstdio>

int main ()
{
    int n,m,l,i,j,k;
    int A[100][100],B[100][100],sum[100][100];
    scanf("%d%d%d", &m, &n, &l);

    for(int i = 0; i < m; i++)
    {
        for(int j = 0; j < n; j++)
            sum[i][j] = 0;
            scanf("%d",&A[i][j]);
    }

    for(int i = 0; i < n; i++)
    {
        for(int j = 0; j < l; j++)
            scanf("%d",&B[i][j]);
    }

    for(int i = 0; i < n; i++)
    {
        for(int j = 0; j < m; j++)
        {
            sum = 0;
            for(int k = 0; k < l; k++)
            {
                sum[i][k] += A[i][j]*B[j][k];
            }
            printf("%d ",sum[i][k]);
        }
        printf("\n");
    } 
    
    return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: incompatible types in assignment of 'int' to 'int [100][100]'
   26 |             sum = 0;
      |             ~~~~^~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n, m, l;
  long long A[100][100], B[100][100], C[100][100];

  cin >>n >> m >> l;
  for(int i =0; i<n; i++)
    for(int j=0; j<m; j++)cin>>A[i][j];
  for(int i=0; i<m;i++)
    for(int j=0; j<l; j++)cin>>B[i][j];

  for(int i=0; i<n; i++){
    for(int j=0; j<l; j++){
      C[i][j]=0;
      for(int k=0; K<m; k++){
        C[i][j]+=A[i][k]*B[k][j];
      }
    }
  }
  for(int i=0; i<n; i++){
    for(int j=0; j<l; J++){
      if(j)cout<< " ";
      cout << C[i][j];
    }
    cout <<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: 'K' was not declared in this scope
   17 |       for(int k=0; K<m; k++){
      |                    ^
a.cc:23:23: error: 'J' was not declared in this scope
   23 |     for(int j=0; j<l; J++){
      |                       ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n, m, l;
  long long A[100][100], B[100][100], C[100][100];

  cin >>n >> m >> l;
  for(int i =0; i<n; i++)
    for(int j=0; j<m; j++) cin >> A[i][j];
  for(int i=0; i<m;i++)
    for(int j=0; j<l; j++) cin >> B[i][j];

  for(int i=0; i<n; i++){
    for(int j=0; j<l; j++){
      C[i][j]=0;
      for(int k=0; K<m; k++){
        C[i][j]+=A[i][k]*B[k][j];
      }
    }
  }
  for(int i=0; i<n; i++){
    for(int j=0; j<l; J++){
      if(j)cout<< " ";
      cout << C[i][j];
    }
    cout <<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: 'K' was not declared in this scope
   17 |       for(int k=0; K<m; k++){
      |                    ^
a.cc:23:23: error: 'J' was not declared in this scope
   23 |     for(int j=0; j<l; J++){
      |                       ^