Language: C++

#include<iostream>
#include<cmath>
#include<algorithm>
int main () {
    int n,x[100]={0},y[100]-{0}, D;
    cin >> n;
    for(i=0;i<n;i++){
        cin >> x[i];
    }
    for(i=0;i<n;i++){
        cin >> y[i];
    }
    for(i=0;i<n;i++) {
        D1+=abs(x[i]-y[i]);
        D2 += pow(x[i]-y[i],2);
        D∞ =max(x[i]-y[i],x[i+1]-y[i+1]);
    }
    cout << D1 << " " << sqrt(D2) << " " << D∞ << endl;
}

Compiler output:
a.cc:16:9: error: extended character ∞ is not valid in an identifier
   16 |         D∞ =max(x[i]-y[i],x[i+1]-y[i+1]);
      |         ^
a.cc:18:45: error: extended character ∞ is not valid in an identifier
   18 |     cout << D1 << " " << sqrt(D2) << " " << D∞ << endl;
      |                                             ^
a.cc: In function 'int main()':
a.cc:5:28: error: expected initializer before '-' token
    5 |     int n,x[100]={0},y[100]-{0}, D;
      |                            ^
a.cc:5:32: error: expected primary-expression before ',' token
    5 |     int n,x[100]={0},y[100]-{0}, D;
      |                                ^
a.cc:5:34: error: 'D' was not declared in this scope
    5 |     int n,x[100]={0},y[100]-{0}, D;
      |                                  ^
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> n;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:9: error: 'i' was not declared in this scope
    7 |     for(i=0;i<n;i++){
      |         ^
a.cc:10:9: error: 'i' was not declared in this scope
   10 |     for(i=0;i<n;i++){
      |         ^
a.cc:11:16: error: 'y' was not declared in this scope
   11 |         cin >> y[i];
      |                ^
a.cc:13:9: error: 'i' was not declared in this scope
   13 |     for(i=0;i<n;i++) {
      |         ^
a.cc:14:9: error: 'D1' was not declared in this scope; did you mean 'y1'?
   14 |         D1+=abs(x[i]-y[i]);
      |         ^~
      |         y1
a.cc:14:22: error: 'y' was not declared in this scope
   14 |         D1+=abs(x[i]-y[i]);
      |                      ^
a.cc:15:9: error: 'D2' was not declared in this scope
   15 |         D2 += pow(x[i]-y[i],2);
      |         ^~
a.cc:16:9: error: 'D\U0000221e' was not declared in this scope
   16 |         D∞ =max(x[i]-y[i],x[i+1]-y[i+1]);
      |         ^~
a.cc:16:13: error: 'max' was not declared in this scope; did you mean 'std::max'?
   16 |         D∞ =max(x[i]-y[i],x[i+1]-y[i+1]);
      |             ^~~
      |             std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:18:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |     cout << D1 << " " << sqrt(D2) << " " << D∞ << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:13: error: 'D1' was not declared in this scope; did you mean 'y1'?
   18 |     cout << D1 << " " << sqrt(D2) << " " << D∞ << endl;
      |             ^~
      |             y1
a.cc:18:31: error: 'D2' was not declared in this scope
   18 |     cout << D1 << " " << sqrt(D2) << " " << D∞ << endl;
      |                               ^~
a.cc:18:45: error: 'D\U0000221e' was not declared in this scope
   18 |     cout << D1 << " " << sqrt(D2) << " " << D∞ << endl;
      |                                             ^~
a.cc:18:51: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |     cout << D1 << " " << sqrt(D2) << " " << D∞ << endl;
      |                                                   ^~~~
      |                                                   std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~