Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> l(N),r(N);
  
  for(i==0,i<N,i++) cin>>l.at(i);
  for(i==0,i<N,i++) cin>>r.at(i);
  #include <bits/stdc++.h>
using namespace std;

int main() {
  int i;
  int N;
  cin >> N;
  vector<int> l(N),r(N);
  
  for(i==0;i<N;i++) cin>>l.at(i);
  for(i==0;i<N;i++) cin>>r.at(i);
  
  int sum=0;
  
  for(i==0;i<N;i++) sum += abs(r.at(i) - l.at(i));
    cout <<sum<<endl;
}
  int sum=0;
  
  for(i==0,i<N,i++) sum += abs(r.at(i) - l.at(i))
    cout <<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i==0,i<N,i++) cin>>l.at(i);
      |       ^
a.cc:10:3: error: expected primary-expression before 'for'
   10 |   for(i==0,i<N,i++) cin>>r.at(i);
      |   ^~~
a.cc:9:34: error: expected ';' before 'for'
    9 |   for(i==0,i<N,i++) cin>>l.at(i);
      |                                  ^
      |                                  ;
   10 |   for(i==0,i<N,i++) cin>>r.at(i);
      |   ~~~                             
a.cc:10:3: error: expected primary-expression before 'for'
   10 |   for(i==0,i<N,i++) cin>>r.at(i);
      |   ^~~
a.cc:9:34: error: expected ')' before 'for'
    9 |   for(i==0,i<N,i++) cin>>l.at(i);
      |      ~                           ^
      |                                  )
   10 |   for(i==0,i<N,i++) cin>>r.at(i);
      |   ~~~                             
a.cc:12:1: error: expected primary-expression before 'using'
   12 | using namespace std;
      | ^~~~~
a.cc:10:34: error: expected ';' before 'using'
   10 |   for(i==0,i<N,i++) cin>>r.at(i);
      |                                  ^
      |                                  ;
   11 |   #include <bits/stdc++.h>
   12 | using namespace std;
      | ~~~~~                             
a.cc:12:1: error: expected primary-expression before 'using'
   12 | using namespace std;
      | ^~~~~
a.cc:10:34: error: expected ')' before 'using'
   10 |   for(i==0,i<N,i++) cin>>r.at(i);
      |      ~                           ^
      |                                  )
   11 |   #include <bits/stdc++.h>
   12 | using namespace std;
      | ~~~~~                             
a.cc:14:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   14 | int main() {
      |         ^~
a.cc:14:9: note: remove parentheses to default-initialize a variable
   14 | int main() {
      |         ^~
      |         --
a.cc:14:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:14:12: error: a function-definition is not allowed here before '{' token
   14 | int main() {
      |            ^
a.cc:30:7: error: 'i' was not declared in this scope
   30 |   for(i==0,i<N,i++) sum += abs(r.at(i) - l.at(i))
      |       ^
a.cc:32:1: error: expected primary-expression before '}' token
   32 | }
      | ^
a.cc:31:22: error: expected ';' before '}' token
   31 |     cout <<sum<<endl;
      |                      ^
      |                      ;
   32 | }
      | ~                     
a.cc:32:1: error: expected primary-expression before '}' token
   32 | }
      | ^
a.cc:31:22: error: expected ')' before '}' token
   31 |     cout <<sum<<endl;
      |                      ^
      |                      )
   32 | }
      | ~                     
a.cc:30:6: note: to match this '('
   30 |   for(i==0,i<N,i++) sum += abs(r.at(i) - l.at(i))
      |      ^
a.cc:32:1: error: expected primary-expression before '}' token
   32 | }
      | ^