Language: C

#include <stdio.h>
#include <math.h>
 
#define N 4100
 
typedef struct{
  double x, y;
}P;
 
P dat[N], tmp[N];
int siz;
 
void koch(P a,P b,int n,int p);

main(){
  int i, n;
  scanf("%d",&n);
  dat[siz++] = {0.0, 0.0};
  koch(dat[0], {100.0, 0.0}, n, 0);
  dat[siz++] = {100.0, 0.0};
  for(i=0;i<siz;i++) printf("%.8f %.8f\n", dat[i].x, dat[i].y);
  return 0;
}
void koch(P a, P b, int n, int p){
  P o = (b.x - a.x)/(double)3, (b.y - a.y)/(double)3;
  P s = o.x + a.x, o.y + a.y;
  P u = s.x + o.x /(double)2 - sqrt((double)3) * o.y / 2.0, s.y + sqrt((double)3) * o.x /(double)2 + o.y /(double);
  P t = (b.x-a.x)*(double)2/(double)3+a.x, (b.y-a.y)*(double)2/(double)3+a.y;
  if(p == n) return;
  koch(a,s,n,p+1);
  data[siz++] = s;
  koch(s,u,n,p+1);
  data[siz++] = u;
  koch(u,t,n,p+1);
  data[siz++] = t;
  koch(t,b,n,p+1);
}
 

Compiler output:
main.c:15:1: error: return type defaults to 'int' [-Wimplicit-int]
   15 | main(){
      | ^~~~
main.c: In function 'main':
main.c:18:16: error: expected expression before '{' token
   18 |   dat[siz++] = {0.0, 0.0};
      |                ^
main.c:19:16: error: expected expression before '{' token
   19 |   koch(dat[0], {100.0, 0.0}, n, 0);
      |                ^
main.c:19:3: error: too few arguments to function 'koch'
   19 |   koch(dat[0], {100.0, 0.0}, n, 0);
      |   ^~~~
main.c:13:6: note: declared here
   13 | void koch(P a,P b,int n,int p);
      |      ^~~~
main.c:20:16: error: expected expression before '{' token
   20 |   dat[siz++] = {100.0, 0.0};
      |                ^
main.c: In function 'koch':
main.c:25:9: error: invalid initializer
   25 |   P o = (b.x - a.x)/(double)3, (b.y - a.y)/(double)3;
      |         ^
main.c:25:34: error: expected ')' before '.' token
   25 |   P o = (b.x - a.x)/(double)3, (b.y - a.y)/(double)3;
      |                                  ^
      |                                  )
main.c:26:9: error: invalid initializer
   26 |   P s = o.x + a.x, o.y + a.y;
      |         ^
main.c:26:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   26 |   P s = o.x + a.x, o.y + a.y;
      |                     ^
main.c:27:9: error: invalid initializer
   27 |   P u = s.x + o.x /(double)2 - sqrt((double)3) * o.y / 2.0, s.y + sqrt((double)3) * o.x /(double)2 + o.y /(double);
      |         ^
main.c:27:62: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   27 |   P u = s.x + o.x /(double)2 - sqrt((double)3) * o.y / 2.0, s.y + sqrt((double)3) * o.x /(double)2 + o.y /(double);
      |                                                              ^
main.c:28:9: error: invalid initializer
   28 |   P t = (b.x-a.x)*(double)2/(double)3+a.x, (b.y-a.y)*(double)2/(double)3+a.y;
      |         ^
main.c:28:46: error: expected ')' before '.' token
   28 |   P t = (b.x-a.x)*(double)2/(double)3+a.x, (b.y-a.y)*(double)2/(double)3+a.y;
      |                                              ^
      |                                              )
main.c:31:3: error: 'data' undeclared (first use in this function); did you mean 'dat'?
   31 |   data[siz++] = s;
      |   ^~~~
      |   dat
main.c:31:3: note: each undeclared identifier is reported only once for each function it appears in