9752022-02-07 20:15:10Kevinke12Toronyépítés (80 pont)cpp14Compilation error
#include <bits/stdc++.h>
#define ll long long
using namespace std;
long long int a[n];

int main()
{
    int n;
    cin >> n;
    
    a[0]=3;
    a[1]=10;
    for (int i=2;i<n;i++) {
       a[i]=a[i-2]+a[i-1]*3;
	   a[i] = a[i]%%20210108;
    }
    cout << a[n-1]%20210108;
    return 0;
}
Compilation error
exit status 1main.cpp:4:17: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
    4 | long long int a[n];
      |                 ^
      |                 yn
main.cpp: In function ‘int main()’:
main.cpp:11:5: error: ‘a’ was not declared in this scope
   11 |     a[0]=3;
      |     ^
main.cpp:15:17: error: expected primary-expression before ‘%’ token
   15 |     a[i] = a[i]%%20210108;
      |                 ^
Exited with error status 1