Language: C++

#include <stdio.h>
#include <math.h>

struct Poin{double x, y;};

void koch(int n, Point a, Point b){
    if(n == 0) return;
    
    Point s, t, u;
    double th = M_PI * 60 / 180;

    s.x = (2.0 * a.x + b.x) / 3.0;
    s.y = (2.0 * a.y + b.y) / 3.0;
    t.x = (a.x + 2.0 * b.x) / 3.0;
    t.y = (a.y + 2.0 * b.y) / 3.0;
    u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x;
    u.y = (t.x - s.x) * sin(th) - (t.y - s.y) * cos(th) + s.y;
    

    koch(n - 1, a, s);
    printf("%.8f %.8f\n", a.x, a.y);
    koch(n - 1, s, u);
    printf("%.8f %.8f\n", u.x, u.y);
    koch(n - 1, u, t);
    printf("%.8f %.8f\n", t.x, t.y);
    koch(n - 1, t, b);
}

int main(){
    Point a, b;
    int n;

    scanf("%d", &n);

    a.x = 0;
    a.y = 0;
    b.x = 100;
    b.y = 0;

    printf("%.8f %.8f\n", a.x, a.y);
    koch(n, a, b);
    printf("%.8f %.8f\n", b.x, b.y);

    return 0;
}

Compiler output:
a.cc:6:18: error: 'Point' has not been declared
    6 | void koch(int n, Point a, Point b){
      |                  ^~~~~
a.cc:6:27: error: 'Point' has not been declared
    6 | void koch(int n, Point a, Point b){
      |                           ^~~~~
a.cc: In function 'void koch(int, int, int)':
a.cc:9:5: error: 'Point' was not declared in this scope; did you mean 'Poin'?
    9 |     Point s, t, u;
      |     ^~~~~
      |     Poin
a.cc:12:5: error: 's' was not declared in this scope
   12 |     s.x = (2.0 * a.x + b.x) / 3.0;
      |     ^
a.cc:12:20: error: request for member 'x' in 'a', which is of non-class type 'int'
   12 |     s.x = (2.0 * a.x + b.x) / 3.0;
      |                    ^
a.cc:12:26: error: request for member 'x' in 'b', which is of non-class type 'int'
   12 |     s.x = (2.0 * a.x + b.x) / 3.0;
      |                          ^
a.cc:13:20: error: request for member 'y' in 'a', which is of non-class type 'int'
   13 |     s.y = (2.0 * a.y + b.y) / 3.0;
      |                    ^
a.cc:13:26: error: request for member 'y' in 'b', which is of non-class type 'int'
   13 |     s.y = (2.0 * a.y + b.y) / 3.0;
      |                          ^
a.cc:14:5: error: 't' was not declared in this scope; did you mean 'th'?
   14 |     t.x = (a.x + 2.0 * b.x) / 3.0;
      |     ^
      |     th
a.cc:14:14: error: request for member 'x' in 'a', which is of non-class type 'int'
   14 |     t.x = (a.x + 2.0 * b.x) / 3.0;
      |              ^
a.cc:14:26: error: request for member 'x' in 'b', which is of non-class type 'int'
   14 |     t.x = (a.x + 2.0 * b.x) / 3.0;
      |                          ^
a.cc:15:14: error: request for member 'y' in 'a', which is of non-class type 'int'
   15 |     t.y = (a.y + 2.0 * b.y) / 3.0;
      |              ^
a.cc:15:26: error: request for member 'y' in 'b', which is of non-class type 'int'
   15 |     t.y = (a.y + 2.0 * b.y) / 3.0;
      |                          ^
a.cc:16:5: error: 'u' was not declared in this scope
   16 |     u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x;
      |     ^
a.cc:21:29: error: request for member 'x' in 'a', which is of non-class type 'int'
   21 |     printf("%.8f %.8f\n", a.x, a.y);
      |                             ^
a.cc:21:34: error: request for member 'y' in 'a', which is of non-class type 'int'
   21 |     printf("%.8f %.8f\n", a.x, a.y);
      |                                  ^
a.cc: In function 'int main()':
a.cc:30:5: error: 'Point' was not declared in this scope; did you mean 'Poin'?
   30 |     Point a, b;
      |     ^~~~~
      |     Poin
a.cc:35:5: error: 'a' was not declared in this scope
   35 |     a.x = 0;
      |     ^
a.cc:37:5: error: 'b' was not declared in this scope
   37 |     b.x = 100;
      |     ^