criyle/codenet-compile-errors huggingface dataset:
Language: C

#include<stdio.h>
#include<math.h>
 
struct point{ double x,y; };

void koch(int,Point,Point);
 

 
void koch(int n,Point a,Point b){
  Point s,t,u;
  double th = M_PI * 60.0 / 180.0;
 
  if(n == 0)return;
 
  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
  t.y = (1.0 * 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",s.x,s.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:
main.c:6:15: error: unknown type name 'Point'; did you mean 'int'?
    6 | void koch(int,Point,Point);
      |               ^~~~~
      |               int
main.c:6:21: error: unknown type name 'Point'; did you mean 'int'?
    6 | void koch(int,Point,Point);
      |                     ^~~~~
      |                     int
main.c:10:17: error: unknown type name 'Point'; did you mean 'int'?
   10 | void koch(int n,Point a,Point b){
      |                 ^~~~~
      |                 int
main.c:10:25: error: unknown type name 'Point'; did you mean 'int'?
   10 | void koch(int n,Point a,Point b){
      |                         ^~~~~
      |                         int
main.c: In function 'main':
main.c:33:3: error: unknown type name 'Point'; did you mean 'int'?
   33 |   Point a,b;
      |   ^~~~~
      |   int
main.c:38:4: error: request for member 'x' in something not a structure or union
   38 |   a.x = 0;
      |    ^
main.c:39:4: error: request for member 'y' in something not a structure or union
   39 |   a.y = 0;
      |    ^
main.c:40:4: error: request for member 'x' in something not a structure or union
   40 |   b.x = 100
      |    ^
main.c:40:12: error: expected ';' before 'b'
   40 |   b.x = 100
      |            ^
      |            ;
   41 |   b.y = 0;
      |   ~         
main.c:43:23: error: request for member 'x' in something not a structure or union
   43 |   printf("%8f %8f\n",a.x,a.y);
      |                       ^
main.c:43:27: error: request for member 'y' in something not a structure or union
   43 |   printf("%8f %8f\n",a.x,a.y);
      |                           ^
main.c:44:3: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   44 |   koch(n,a,b);
      |   ^~~~
main.c:45:23: error: request for member 'x' in something not a structure or union
   45 |   printf("%8f %8f\n",b.x,b.y);
      |                       ^
main.c:45:27: error: request for member 'y' in something not a structure or union
   45 |   printf("%8f %8f\n",b.x,b.y);
      |                           ^
Language: C

#include<stdio.h>
#include<math.h>
 
struct point{ double x,y;};

void koch(int,Point,Point);
 

 
void koch(int n,Point a,Point b){
  Point s,t,u;
  double th = M_PI * 60.0 / 180.0;
 
  if(n == 0)return;
 
  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
  t.y = (1.0 * 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",s.x,s.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:
main.c:6:15: error: unknown type name 'Point'; did you mean 'int'?
    6 | void koch(int,Point,Point);
      |               ^~~~~
      |               int
main.c:6:21: error: unknown type name 'Point'; did you mean 'int'?
    6 | void koch(int,Point,Point);
      |                     ^~~~~
      |                     int
main.c:10:17: error: unknown type name 'Point'; did you mean 'int'?
   10 | void koch(int n,Point a,Point b){
      |                 ^~~~~
      |                 int
main.c:10:25: error: unknown type name 'Point'; did you mean 'int'?
   10 | void koch(int n,Point a,Point b){
      |                         ^~~~~
      |                         int
main.c: In function 'main':
main.c:33:3: error: unknown type name 'Point'; did you mean 'int'?
   33 |   Point a,b;
      |   ^~~~~
      |   int
main.c:38:4: error: request for member 'x' in something not a structure or union
   38 |   a.x = 0;
      |    ^
main.c:39:4: error: request for member 'y' in something not a structure or union
   39 |   a.y = 0;
      |    ^
main.c:40:4: error: request for member 'x' in something not a structure or union
   40 |   b.x = 100;
      |    ^
main.c:41:4: error: request for member 'y' in something not a structure or union
   41 |   b.y = 0;
      |    ^
main.c:43:23: error: request for member 'x' in something not a structure or union
   43 |   printf("%8f %8f\n",a.x,a.y);
      |                       ^
main.c:43:27: error: request for member 'y' in something not a structure or union
   43 |   printf("%8f %8f\n",a.x,a.y);
      |                           ^
main.c:44:3: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   44 |   koch(n,a,b);
      |   ^~~~
main.c:45:23: error: request for member 'x' in something not a structure or union
   45 |   printf("%8f %8f\n",b.x,b.y);
      |                       ^
main.c:45:27: error: request for member 'y' in something not a structure or union
   45 |   printf("%8f %8f\n",b.x,b.y);
      |                           ^
Language: C

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

int n;

void koch(int d, double x1, double y1, double x2,double y2){
 double sin60 = sqrt(3.0)/2.0;
 double cos60 = 0.5;

 double sx = (2 * x1 + x2)/3;
 double sy = (2 * y1 + y2)/3;
 double tx = (2 * x2 + x1)/3;
 double ty = (2 * y2 + y1)/3;

 double vx = tx - sx;
 double vy = ty - sy;

 double ux = sx + cos60 * vx - sin60 * vy;
 double uy = sy + sin60 * vx + cos60 * vy;


 if(d >= n)
  return;

 koch(d + 1,x1,y1,sx,sy);
 printf("%.8f %.8f\n",sx,sy);
 koch(d + 1,sx,sy,ux,uy);
 printf("%.8f %.8f\n",ux,uy);
 koch(d + 1,ux,uy,tx,ty);
 printf("%.8f %.8f\n",tx,ty);
 koch(d + 1,tx,ty,x2,y2);
 }

int main(){

  scanf("%d",&n);
  printf("%.8f %.8f\n",0.0,0.0);
  compute(0,0.0,0.0,100.0,0.0);
  printf("%.8f %.8f\n",100.0,0.0);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:38:3: error: implicit declaration of function 'compute' [-Wimplicit-function-declaration]
   38 |   compute(0,0.0,0.0,100.0,0.0);
      |   ^~~~~~~
Language: C

#include<stdio.h>
#include<math.h>
 
struct point{ double x,y;};
 

 
void koch(int n,Point a,Point b){
  Point s,t,u;
  double th = M_PI * 60.0 / 180.0;
 
  if(n == 0)return;
 
  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
  t.y = (1.0 * 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",s.x,s.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:
main.c:8:17: error: unknown type name 'Point'; did you mean 'int'?
    8 | void koch(int n,Point a,Point b){
      |                 ^~~~~
      |                 int
main.c:8:25: error: unknown type name 'Point'; did you mean 'int'?
    8 | void koch(int n,Point a,Point b){
      |                         ^~~~~
      |                         int
main.c: In function 'main':
main.c:31:3: error: unknown type name 'Point'; did you mean 'int'?
   31 |   Point a,b;
      |   ^~~~~
      |   int
main.c:36:4: error: request for member 'x' in something not a structure or union
   36 |   a.x = 0;
      |    ^
main.c:37:4: error: request for member 'y' in something not a structure or union
   37 |   a.y = 0;
      |    ^
main.c:38:4: error: request for member 'x' in something not a structure or union
   38 |   b.x = 100;
      |    ^
main.c:39:4: error: request for member 'y' in something not a structure or union
   39 |   b.y = 0;
      |    ^
main.c:41:23: error: request for member 'x' in something not a structure or union
   41 |   printf("%8f %8f\n",a.x,a.y);
      |                       ^
main.c:41:27: error: request for member 'y' in something not a structure or union
   41 |   printf("%8f %8f\n",a.x,a.y);
      |                           ^
main.c:42:3: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   42 |   koch(n,a,b);
      |   ^~~~
main.c:43:23: error: request for member 'x' in something not a structure or union
   43 |   printf("%8f %8f\n",b.x,b.y);
      |                       ^
main.c:43:27: error: request for member 'y' in something not a structure or union
   43 |   printf("%8f %8f\n",b.x,b.y);
      |                           ^
Language: C

#include<stdio.h>


void kosh(int n,  a, Point b){
  if(n==0) return;
   



s.x=(2.0*a.x+1.0*b.x)/3.0;
s.y=(2.0*a.y+1.0*b.y)/3.0;
s.x=(1.0*a.x+2.0*b.x)/3.0;
s.x=(1.0*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.x;

Compiler output:
main.c:4:19: error: unknown type name 'a'
    4 | void kosh(int n,  a, Point b){
      |                   ^
main.c:4:22: error: unknown type name 'Point'; did you mean 'int'?
    4 | void kosh(int n,  a, Point b){
      |                      ^~~~~
      |                      int
Language: C

#include<stdio.h>
#include<math.h>
 
struct point{ double x,y;};
 

 
void koch(int n, Point a, Point b){
   if(n == 0)return;
  Point s,t,u;
  double th = M_PI * 60.0 / 180.0;
 
  
  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
  t.y = (1.0 * 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",s.x,s.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:
main.c:8:18: error: unknown type name 'Point'; did you mean 'int'?
    8 | void koch(int n, Point a, Point b){
      |                  ^~~~~
      |                  int
main.c:8:27: error: unknown type name 'Point'; did you mean 'int'?
    8 | void koch(int n, Point a, Point b){
      |                           ^~~~~
      |                           int
main.c: In function 'main':
main.c:31:3: error: unknown type name 'Point'; did you mean 'int'?
   31 |   Point a,b;
      |   ^~~~~
      |   int
main.c:36:4: error: request for member 'x' in something not a structure or union
   36 |   a.x = 0;
      |    ^
main.c:37:4: error: request for member 'y' in something not a structure or union
   37 |   a.y = 0;
      |    ^
main.c:38:4: error: request for member 'x' in something not a structure or union
   38 |   b.x = 100;
      |    ^
main.c:39:4: error: request for member 'y' in something not a structure or union
   39 |   b.y = 0;
      |    ^
main.c:41:23: error: request for member 'x' in something not a structure or union
   41 |   printf("%8f %8f\n",a.x,a.y);
      |                       ^
main.c:41:27: error: request for member 'y' in something not a structure or union
   41 |   printf("%8f %8f\n",a.x,a.y);
      |                           ^
main.c:42:3: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   42 |   koch(n,a,b);
      |   ^~~~
main.c:43:23: error: request for member 'x' in something not a structure or union
   43 |   printf("%8f %8f\n",b.x,b.y);
      |                       ^
main.c:43:27: error: request for member 'y' in something not a structure or union
   43 |   printf("%8f %8f\n",b.x,b.y);
      |                           ^
Language: C

#include<stdio.h>
#include<math.h>
 
struct Point{ double x,y;};
 

 
void koch(int n, Point a, Point b){
   if(n == 0)return;
  Point s, t, u;
  double th = M_PI * 60.0 / 180.0;
 
  
  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
  t.y = (1.0 * 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",s.x,s.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:
main.c:8:18: error: unknown type name 'Point'; did you mean 'int'?
    8 | void koch(int n, Point a, Point b){
      |                  ^~~~~
      |                  int
main.c:8:27: error: unknown type name 'Point'; did you mean 'int'?
    8 | void koch(int n, Point a, Point b){
      |                           ^~~~~
      |                           int
main.c: In function 'main':
main.c:31:3: error: unknown type name 'Point'; use 'struct' keyword to refer to the type
   31 |   Point a, b;
      |   ^~~~~
      |   struct 
main.c:36:4: error: request for member 'x' in something not a structure or union
   36 |   a.x = 0;
      |    ^
main.c:37:4: error: request for member 'y' in something not a structure or union
   37 |   a.y = 0;
      |    ^
main.c:38:4: error: request for member 'x' in something not a structure or union
   38 |   b.x = 100;
      |    ^
main.c:39:4: error: request for member 'y' in something not a structure or union
   39 |   b.y = 0;
      |    ^
main.c:41:23: error: request for member 'x' in something not a structure or union
   41 |   printf("%8f %8f\n",a.x, a.y);
      |                       ^
main.c:41:28: error: request for member 'y' in something not a structure or union
   41 |   printf("%8f %8f\n",a.x, a.y);
      |                            ^
main.c:42:3: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   42 |   koch(n, a, b);
      |   ^~~~
main.c:43:23: error: request for member 'x' in something not a structure or union
   43 |   printf("%8f %8f\n",b.x, b.y);
      |                       ^
main.c:43:28: error: request for member 'y' in something not a structure or union
   43 |   printf("%8f %8f\n",b.x, b.y);
      |                            ^
Language: C

#include <stdio.h>

struct point { double x, y;};

void Koch(int n, Point a, Point b)
{
  if (n == 0) {
    return;
  }
  Point s, t, u;
  double th = M_PI * 60.0 / 180.0;

  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
  t.y = (1.0 * 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", s.x, s.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 - 1, u, t);
  printf("%.8f %.8f\n", b.x, b.y);

  return 0;
}

Compiler output:
main.c:5:18: error: unknown type name 'Point'; did you mean 'int'?
    5 | void Koch(int n, Point a, Point b)
      |                  ^~~~~
      |                  int
main.c:5:27: error: unknown type name 'Point'; did you mean 'int'?
    5 | void Koch(int n, Point a, Point b)
      |                           ^~~~~
      |                           int
main.c: In function 'main':
main.c:31:3: error: unknown type name 'Point'; did you mean 'int'?
   31 |   Point a, b;
      |   ^~~~~
      |   int
main.c:36:4: error: request for member 'x' in something not a structure or union
   36 |   a.x = 0;
      |    ^
main.c:37:4: error: request for member 'y' in something not a structure or union
   37 |   a.y = 0;
      |    ^
main.c:38:4: error: request for member 'x' in something not a structure or union
   38 |   b.x = 100;
      |    ^
main.c:39:4: error: request for member 'y' in something not a structure or union
   39 |   b.y = 0;
      |    ^
main.c:41:26: error: request for member 'x' in something not a structure or union
   41 |   printf("%.8f %.8f\n", a.x, a.y);
      |                          ^
main.c:41:31: error: request for member 'y' in something not a structure or union
   41 |   printf("%.8f %.8f\n", a.x, a.y);
      |                               ^
main.c:42:3: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   42 |   koch(n - 1, u, t);
      |   ^~~~
main.c:42:15: error: 'u' undeclared (first use in this function)
   42 |   koch(n - 1, u, t);
      |               ^
main.c:42:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:42:18: error: 't' undeclared (first use in this function)
   42 |   koch(n - 1, u, t);
      |                  ^
main.c:43:26: error: request for member 'x' in something not a structure or union
   43 |   printf("%.8f %.8f\n", b.x, b.y);
      |                          ^
main.c:43:31: error: request for member 'y' in something not a structure or union
   43 |   printf("%.8f %.8f\n", b.x, b.y);
      |                               ^
Language: C

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

struct point { double x, y;};

void Koch(int n, Point a, Point b)
{
  if (n == 0) {
    return;
  }
  Point s, t, u;
  double th = M_PI * 60.0 / 180.0;

  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
  t.y = (1.0 * 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", s.x, s.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 - 1, u, t);
  printf("%.8f %.8f\n", b.x, b.y);

  return 0;
}

Compiler output:
main.c:2:1: error: invalid suffix "include" on integer constant
    2 | 3include <math.h>
      | ^~~~~~~~
main.c:2:1: error: expected identifier or '(' before numeric constant
main.c:6:18: error: unknown type name 'Point'; did you mean 'int'?
    6 | void Koch(int n, Point a, Point b)
      |                  ^~~~~
      |                  int
main.c:6:27: error: unknown type name 'Point'; did you mean 'int'?
    6 | void Koch(int n, Point a, Point b)
      |                           ^~~~~
      |                           int
main.c: In function 'main':
main.c:32:3: error: unknown type name 'Point'; did you mean 'int'?
   32 |   Point a, b;
      |   ^~~~~
      |   int
main.c:37:4: error: request for member 'x' in something not a structure or union
   37 |   a.x = 0;
      |    ^
main.c:38:4: error: request for member 'y' in something not a structure or union
   38 |   a.y = 0;
      |    ^
main.c:39:4: error: request for member 'x' in something not a structure or union
   39 |   b.x = 100;
      |    ^
main.c:40:4: error: request for member 'y' in something not a structure or union
   40 |   b.y = 0;
      |    ^
main.c:42:26: error: request for member 'x' in something not a structure or union
   42 |   printf("%.8f %.8f\n", a.x, a.y);
      |                          ^
main.c:42:31: error: request for member 'y' in something not a structure or union
   42 |   printf("%.8f %.8f\n", a.x, a.y);
      |                               ^
main.c:43:3: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   43 |   koch(n - 1, u, t);
      |   ^~~~
main.c:43:15: error: 'u' undeclared (first use in this function)
   43 |   koch(n - 1, u, t);
      |               ^
main.c:43:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:43:18: error: 't' undeclared (first use in this function)
   43 |   koch(n - 1, u, t);
      |                  ^
main.c:44:26: error: request for member 'x' in something not a structure or union
   44 |   printf("%.8f %.8f\n", b.x, b.y);
      |                          ^
main.c:44:31: error: request for member 'y' in something not a structure or union
   44 |   printf("%.8f %.8f\n", b.x, b.y);
      |                               ^
Language: C

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

struct point { double x, y;};

void Koch(int n, Point a, Point b)
{
  if (n == 0) {
    return;
  }
  Point s, t, u;
  double th = M_PI * 60.0 / 180.0;

  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
  t.y = (1.0 * 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", s.x, s.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 - 1, u, t);
  printf("%.8f %.8f\n", b.x, b.y);

  return 0;
}

Compiler output:
main.c:6:18: error: unknown type name 'Point'; did you mean 'int'?
    6 | void Koch(int n, Point a, Point b)
      |                  ^~~~~
      |                  int
main.c:6:27: error: unknown type name 'Point'; did you mean 'int'?
    6 | void Koch(int n, Point a, Point b)
      |                           ^~~~~
      |                           int
main.c: In function 'main':
main.c:32:3: error: unknown type name 'Point'; did you mean 'int'?
   32 |   Point a, b;
      |   ^~~~~
      |   int
main.c:37:4: error: request for member 'x' in something not a structure or union
   37 |   a.x = 0;
      |    ^
main.c:38:4: error: request for member 'y' in something not a structure or union
   38 |   a.y = 0;
      |    ^
main.c:39:4: error: request for member 'x' in something not a structure or union
   39 |   b.x = 100;
      |    ^
main.c:40:4: error: request for member 'y' in something not a structure or union
   40 |   b.y = 0;
      |    ^
main.c:42:26: error: request for member 'x' in something not a structure or union
   42 |   printf("%.8f %.8f\n", a.x, a.y);
      |                          ^
main.c:42:31: error: request for member 'y' in something not a structure or union
   42 |   printf("%.8f %.8f\n", a.x, a.y);
      |                               ^
main.c:43:3: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   43 |   koch(n - 1, u, t);
      |   ^~~~
main.c:43:15: error: 'u' undeclared (first use in this function)
   43 |   koch(n - 1, u, t);
      |               ^
main.c:43:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:43:18: error: 't' undeclared (first use in this function)
   43 |   koch(n - 1, u, t);
      |                  ^
main.c:44:26: error: request for member 'x' in something not a structure or union
   44 |   printf("%.8f %.8f\n", b.x, b.y);
      |                          ^
main.c:44:31: error: request for member 'y' in something not a structure or union
   44 |   printf("%.8f %.8f\n", b.x, b.y);
      |                               ^
Language: C

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

struct Point { double x, y;};

void Koch(int n, Point a, Point b)
{
  if (n == 0) {
    return;
  }
  Point s, t, u;
  double th = M_PI * 60.0 / 180.0;

  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
  t.y = (1.0 * 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", s.x, s.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 - 1, u, t);
  printf("%.8f %.8f\n", b.x, b.y);

  return 0;
}

Compiler output:
main.c:6:18: error: unknown type name 'Point'; did you mean 'int'?
    6 | void Koch(int n, Point a, Point b)
      |                  ^~~~~
      |                  int
main.c:6:27: error: unknown type name 'Point'; did you mean 'int'?
    6 | void Koch(int n, Point a, Point b)
      |                           ^~~~~
      |                           int
main.c: In function 'main':
main.c:32:3: error: unknown type name 'Point'; use 'struct' keyword to refer to the type
   32 |   Point a, b;
      |   ^~~~~
      |   struct 
main.c:37:4: error: request for member 'x' in something not a structure or union
   37 |   a.x = 0;
      |    ^
main.c:38:4: error: request for member 'y' in something not a structure or union
   38 |   a.y = 0;
      |    ^
main.c:39:4: error: request for member 'x' in something not a structure or union
   39 |   b.x = 100;
      |    ^
main.c:40:4: error: request for member 'y' in something not a structure or union
   40 |   b.y = 0;
      |    ^
main.c:42:26: error: request for member 'x' in something not a structure or union
   42 |   printf("%.8f %.8f\n", a.x, a.y);
      |                          ^
main.c:42:31: error: request for member 'y' in something not a structure or union
   42 |   printf("%.8f %.8f\n", a.x, a.y);
      |                               ^
main.c:43:3: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   43 |   koch(n - 1, u, t);
      |   ^~~~
main.c:43:15: error: 'u' undeclared (first use in this function)
   43 |   koch(n - 1, u, t);
      |               ^
main.c:43:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:43:18: error: 't' undeclared (first use in this function)
   43 |   koch(n - 1, u, t);
      |                  ^
main.c:44:26: error: request for member 'x' in something not a structure or union
   44 |   printf("%.8f %.8f\n", b.x, b.y);
      |                          ^
main.c:44:31: error: request for member 'y' in something not a structure or union
   44 |   printf("%.8f %.8f\n", b.x, b.y);
      |                               ^
Language: C

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

struct Point { double x, y; };

void Koch(int n, Point a, Point b)
{
  if (n == 0) {
    return;
  }

  Point s, t, u;
  double th = M_PI * 60.0 / 180.0;

  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
  t.y = (1.0 * 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", s.x, s.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:
main.c:6:18: error: unknown type name 'Point'; did you mean 'int'?
    6 | void Koch(int n, Point a, Point b)
      |                  ^~~~~
      |                  int
main.c:6:27: error: unknown type name 'Point'; did you mean 'int'?
    6 | void Koch(int n, Point a, Point b)
      |                           ^~~~~
      |                           int
main.c: In function 'main':
main.c:33:3: error: unknown type name 'Point'; use 'struct' keyword to refer to the type
   33 |   Point a, b;
      |   ^~~~~
      |   struct 
main.c:38:4: error: request for member 'x' in something not a structure or union
   38 |   a.x = 0;
      |    ^
main.c:39:4: error: request for member 'y' in something not a structure or union
   39 |   a.y = 0;
      |    ^
main.c:40:4: error: request for member 'x' in something not a structure or union
   40 |   b.x = 100;
      |    ^
main.c:41:4: error: request for member 'y' in something not a structure or union
   41 |   b.y = 0;
      |    ^
main.c:43:26: error: request for member 'x' in something not a structure or union
   43 |   printf("%.8f %.8f\n", a.x, a.y);
      |                          ^
main.c:43:31: error: request for member 'y' in something not a structure or union
   43 |   printf("%.8f %.8f\n", a.x, a.y);
      |                               ^
main.c:44:3: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   44 |   koch(n, a, b);
      |   ^~~~
main.c:45:26: error: request for member 'x' in something not a structure or union
   45 |   printf("%.8f %.8f\n", b.x, b.y);
      |                          ^
main.c:45:31: error: request for member 'y' in something not a structure or union
   45 |   printf("%.8f %.8f\n", b.x, b.y);
      |                               ^
Language: C

#include <stdio.h>
#include <math.h>
??
   typedef struct{
????   double x;
????   double y;
   }point;
??
   void koch(int n, point p1, point p2){
????   if(n == 0) return;
??
????   point s, t, u;
????   s.x = (2*p1.x + 1*p2.x)/3;
????   s.y = (2*p1.y + 1*p2.y)/3;
????   t.x = (1*p1.x + 2*p2.x)/3;
????   t.y = (1*p1.y + 2*p2.y)/3;
????   u.x = (t.x - s.x)*0.5 - (t.y - s.y)*(sqrt(3.0)/2.0) + s.x;
????   u.y = (t.x - s.x)*(sqrt(3.0)/2.0) + (t.y - s.y)*0.5 + s.y;
??
??
??   ??koch(n-1, p1, s);
????   printf("%lf %lf\n", s.x, s.y);
????   koch(n-1, s, u);
????   printf("%lf %lf\n", u.x, u.y);
????   koch(n-1, u, t);
????   printf("%lf %lf\n", t.x, t.y);
????   koch(n-1, t, p2);
}
??
   int main(){
????   int n;
??   ??point p1 = {0, 0}, p2 = {100, 0};
????   scanf("%d", &n);
????   printf("%lf %lf\n", p1.x, p1.y);
????   koch(n, p1, p2);
????   printf("%lf %lf\n", p2.x, p2.y);
????   return 0;
}

Compiler output:
main.c:3:1: error: expected identifier or '(' before '?' token
    3 | ??
      | ^
main.c:7:5: warning: data definition has no type or storage class
    7 |    }point;
      |     ^~~~~
main.c:7:5: error: type defaults to 'int' in declaration of 'point' [-Wimplicit-int]
main.c:8:1: error: expected identifier or '(' before '?' token
    8 | ??
      | ^
main.c:29:1: error: expected identifier or '(' before '?' token
   29 | ??
      | ^
Language: C

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

struct Point {double x, y};

void koch(int n, Point a, Point b) {
	if (n == 0) return;
	Point s, t, u;
	double th = M_PI * 60.0 / 180.0;
	s.x = (2.0 * a.x + 1.0 * b.y) / 3.0;
	s.x = (2.0 * a.y + 1.0 * b.y) / 3.0;
	t.x = (1.0 * a.x + 2.0 * b.y) / 3.0;
	t.x = (1.0 * a.x + 2.0 * b.y) / 3.0;
	u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x;
	u.x = (t.x - s.x) * sin(th) - (t.y - s.y) * cos(th) + s.y;

	koch(n - 1, a, s);
	printf("%.8f %.8f\n", s.x, s.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:
main.c:4:26: warning: no semicolon at end of struct or union
    4 | struct Point {double x, y};
      |                          ^
main.c:6:18: error: unknown type name 'Point'; did you mean 'int'?
    6 | void koch(int n, Point a, Point b) {
      |                  ^~~~~
      |                  int
main.c:6:27: error: unknown type name 'Point'; did you mean 'int'?
    6 | void koch(int n, Point a, Point b) {
      |                           ^~~~~
      |                           int
main.c: In function 'main':
main.c:27:9: error: unknown type name 'Point'; use 'struct' keyword to refer to the type
   27 |         Point a, b;
      |         ^~~~~
      |         struct 
main.c:32:10: error: request for member 'x' in something not a structure or union
   32 |         a.x = 0;
      |          ^
main.c:33:10: error: request for member 'y' in something not a structure or union
   33 |         a.y = 0;
      |          ^
main.c:34:10: error: request for member 'x' in something not a structure or union
   34 |         b.x = 100;
      |          ^
main.c:35:10: error: request for member 'y' in something not a structure or union
   35 |         b.y = 0;
      |          ^
main.c:37:32: error: request for member 'x' in something not a structure or union
   37 |         printf("%.8f %.8f\n", a.x, a.y);
      |                                ^
main.c:37:37: error: request for member 'y' in something not a structure or union
   37 |         printf("%.8f %.8f\n", a.x, a.y);
      |                                     ^
main.c:38:9: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   38 |         koch(n, a, b);
      |         ^~~~
main.c:39:32: error: request for member 'x' in something not a structure or union
   39 |         printf("%.8f %.8f\n", b.x, b.y);
      |                                ^
main.c:39:37: error: request for member 'y' in something not a structure or union
   39 |         printf("%.8f %.8f\n", b.x, b.y);
      |                                     ^
Language: C

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

struct Point { double x, y; };

void koch(int n, Point a, Point b) {
	if (n == 0) return;
	Point s, t, u;
	double th = 3.14 * 60.0 / 180.0;
	s.x = (2.0 * a.x + 1.0 * b.y) / 3.0;
	s.x = (2.0 * a.y + 1.0 * b.y) / 3.0;
	t.x = (1.0 * a.x + 2.0 * b.y) / 3.0;
	t.x = (1.0 * a.x + 2.0 * b.y) / 3.0;
	u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x;
	u.x = (t.x - s.x) * sin(th) - (t.y - s.y) * cos(th) + s.y;

	koch(n - 1, a, s);
	printf("%.8f %.8f\n", s.x, s.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:
main.c:6:18: error: unknown type name 'Point'; did you mean 'int'?
    6 | void koch(int n, Point a, Point b) {
      |                  ^~~~~
      |                  int
main.c:6:27: error: unknown type name 'Point'; did you mean 'int'?
    6 | void koch(int n, Point a, Point b) {
      |                           ^~~~~
      |                           int
main.c: In function 'main':
main.c:27:9: error: unknown type name 'Point'; use 'struct' keyword to refer to the type
   27 |         Point a, b;
      |         ^~~~~
      |         struct 
main.c:32:10: error: request for member 'x' in something not a structure or union
   32 |         a.x = 0;
      |          ^
main.c:33:10: error: request for member 'y' in something not a structure or union
   33 |         a.y = 0;
      |          ^
main.c:34:10: error: request for member 'x' in something not a structure or union
   34 |         b.x = 100;
      |          ^
main.c:35:10: error: request for member 'y' in something not a structure or union
   35 |         b.y = 0;
      |          ^
main.c:37:32: error: request for member 'x' in something not a structure or union
   37 |         printf("%.8f %.8f\n", a.x, a.y);
      |                                ^
main.c:37:37: error: request for member 'y' in something not a structure or union
   37 |         printf("%.8f %.8f\n", a.x, a.y);
      |                                     ^
main.c:38:9: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   38 |         koch(n, a, b);
      |         ^~~~
main.c:39:32: error: request for member 'x' in something not a structure or union
   39 |         printf("%.8f %.8f\n", b.x, b.y);
      |                                ^
main.c:39:37: error: request for member 'y' in something not a structure or union
   39 |         printf("%.8f %.8f\n", b.x, b.y);
      |                                     ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
??
typedef struct{
????double x;
????double y;
} zahyo;
??
void koch(int, zahyo, zahyo);
??
int main()
{
????int n;
????zahyo p1,p2;
??
????p1.x = 0.0;
????p1.y = 0.0;
????p2.x = 100.0;
????p2.y = 0.0;
??
????scanf("%d",&n);
????if( n<0 || 6<n ) exit(1);
??
????printf("%f %f\n",p1.x, p1.y);?? /* ????????????§??¨? */
??
????koch(n,p1,p2);
????printf("%f %f\n",p2.x, p2.y);???? /* ????????????§??¨? */
??
????return 0;
}
??
void koch(int n, zahyo p1, zahyo p2)
{
????zahyo s,t,u;
??
????if( n==0 ) return;
??
????s.x = ( 2*p1.x + p2.x )/3;
????s.y = ( 2*p1.y + p2.y )/3;
??
????t.x = ( p1.x + 2*p2.x )/3;
????t.y = ( p1.y + 2*p2.y )/3;
??
????u.x = ( t.x - s.x )*0.5 - ( t.y - s.y )*(sqrt(3)/2) + s.x; 
????u.y = ( t.x - s.x )*(sqrt(3)/2) + ( t.y - s.y )*0.5 + s.y;
??
????koch(n-1, p1, s);
????printf("%f %f\n",s.x, s.y);
??
????koch(n-1, s, u);
????printf("%f %f\n",u.x, u.y);
??
????koch(n-1, u, t);
????printf("%f %f\n",t.x, t.y);
??
????koch(n-1, t, p2);
??
}

Compiler output:
main.c:4:1: error: expected identifier or '(' before '?' token
    4 | ??
      | ^
main.c:8:3: warning: data definition has no type or storage class
    8 | } zahyo;
      |   ^~~~~
main.c:8:3: error: type defaults to 'int' in declaration of 'zahyo' [-Wimplicit-int]
main.c:9:1: error: expected identifier or '(' before '?' token
    9 | ??
      | ^
main.c:11:1: error: expected identifier or '(' before '?' token
   11 | ??
      | ^
main.c:32:1: error: expected identifier or '(' before '?' token
   32 | ??
      | ^
Language: C

#include<stdio.h>
#include<math.h>
 
struct Point { double x,y;};
 
void koch(int n, Point a,Point b){
    if(n==0)return;
     
    Point s,t,u;
    double th=M_PI*60.0/180.0;
     
    s.x=(2.0*a.x+1.0*b.x)/3.0;
    s.y=(2.0*a.y+1.0*b.y)/3.0;
    t.x=(1.0*a.x+2.0*b.x)/3.0;
    t.y=(1.0*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",s.x,s.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:
main.c:6:18: error: unknown type name 'Point'; did you mean 'int'?
    6 | void koch(int n, Point a,Point b){
      |                  ^~~~~
      |                  int
main.c:6:26: error: unknown type name 'Point'; did you mean 'int'?
    6 | void koch(int n, Point a,Point b){
      |                          ^~~~~
      |                          int
main.c: In function 'main':
main.c:29:5: error: unknown type name 'Point'; use 'struct' keyword to refer to the type
   29 |     Point a,b;
      |     ^~~~~
      |     struct 
main.c:33:6: error: request for member 'x' in something not a structure or union
   33 |     a.x=0;
      |      ^
main.c:34:6: error: request for member 'y' in something not a structure or union
   34 |     a.y=0;
      |      ^
main.c:35:6: error: request for member 'x' in something not a structure or union
   35 |     b.x=100;
      |      ^
main.c:36:6: error: request for member 'y' in something not a structure or union
   36 |     b.y=0;
      |      ^
main.c:38:27: error: request for member 'x' in something not a structure or union
   38 |     printf("%.8f %.8f\n",a.x,a.y);
      |                           ^
main.c:38:31: error: request for member 'y' in something not a structure or union
   38 |     printf("%.8f %.8f\n",a.x,a.y);
      |                               ^
main.c:39:5: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   39 |     koch(n,a,b);
      |     ^~~~
main.c:40:27: error: request for member 'x' in something not a structure or union
   40 |     printf("%.8f %.8f\n",b.x,b.y);
      |                           ^
main.c:40:31: error: request for member 'y' in something not a structure or union
   40 |     printf("%.8f %.8f\n",b.x,b.y);
      |                               ^
Language: C

#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>

#include "problems.h"

typedef struct {
  double x;
  double y;
} point_t;

#define PI 3.14159265

static point_t calc_internally_dividing(point_t a, point_t b, int32_t n, int32_t m)
{
  point_t ret = {.x = (n * a.x + m * b.x) / (n + m), .y = (n * a.y + m * b.y) / (n + m)};
  return ret;
}

static point_t add_vector(point_t vec1, point_t vec2)
{
  point_t ret = {.x = vec1.x + vec2.x, .y = vec1.y + vec2.y};
  return ret;
}

static point_t sub_vector(point_t vec1, point_t vec2)
{
  point_t ret = {.x = vec1.x - vec2.x, .y = vec1.y - vec2.y};
  return ret;
}

static point_t rotate_vector(point_t vec, double rad)
{
  point_t ret = {.x = vec.x * cos(rad) - vec.y * sin(rad), .y = vec.y * sin(rad) + vec.y * cos(rad)};
  return ret;
}

size_t koch_curve(uint32_t n, point_t a, point_t b, point_t data[])
{
  size_t len = ((int)pow(4, n)) + 1;

  if (n == 0) {
    data[0] = a;
    data[1] = b;
  } else {
    int32_t data_size = koch_curve(n - 1, a, b, data);

    size_t tmpbuf_size = sizeof(point_t) * len;
    point_t *tmpbuf = (point_t *)malloc(tmpbuf_size);

    if (tmpbuf == NULL) {
      perror("malloc error");
      exit(1);
    }

    for (int32_t i = 0; i < (data_size - 1); i++) {
      point_t s = calc_internally_dividing(data[i], data[i + 1], 2, 1);
      point_t t = calc_internally_dividing(data[i], data[i + 1], 1, 2);
      point_t u = add_vector(rotate_vector(sub_vector(t, s), PI / 3), s);

      tmpbuf[5 * i] = data[i];
      tmpbuf[5 * i + 1] = s;
      tmpbuf[5 * i + 2] = u;
      tmpbuf[5 * i + 3] = t;
      tmpbuf[5 * i + 4] = data[i + 1];
    }
    memcpy(data, tmpbuf, tmpbuf_size);
    free(tmpbuf);
  }

  return len;
}

#if !defined(TEST)
static point_t buf[4096];

static void print_point(point_t x)
{
  printf("%.8f %.8f\n", x.y, x.y);
}

int32_t main(void)
{
  int32_t num;
  scanf("%d", &num);
  point_t a = {.x = 0.0, .y = 0.0};
  point_t b = {.x = 100.0, .y = 0.0};

  size_t len = koch_curve(num, a, b, buf);

  for (uint32_t i = 0; i < len; i++) {
    print_point(buf[i]);
  }

  return 0;
}

#endif

Compiler output:
main.c:7:10: fatal error: problems.h: No such file or directory
    7 | #include "problems.h"
      |          ^~~~~~~~~~~~
compilation terminated.
Language: C

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

struct Point {
double x,y;
};

void koch(int, Point a1,Point a2);

int main()
{
    Point a1,a2;
    int n;
    
    scanf("%d",&n);
    
    a1.x =0;
    a1.y =0;
    a2.x =100;
    a2.y =0;
    


printf("%.8f %.8f\n",a1.x,a2.y);
    koch(n,a1,a2);
    
    printf("%.8f %.8f\n",a2.x ,a2.y);
    
    return 0;
}

void koch(int n, Point a1 ,Point a2)
{
    double razian;
    if(n==0)return 0;
    Point s, t, u;

s.x = (2.0*a1.x + 1.0*a2.x) / 3.0;
s.y = (2.0*a1.y + 1.0*a2.y) / 3.0;
t.x = (1.0*a1.x + 2.0*a2.x) / 3.0;
t.y = (1.0*a1.y + 2.0*a2.y) / 3.0;
u.x=(t.x -s.x)* cos(razian) - (t.x -s.x)* sin(razian)+ s.x;
u.x=(t.x -s.x)* sin(razian) + (t.x -s.x)* cos(razian)+ s.x;

koch(n-1,a, s);
    printf("%.8f %.8f\n",s.x ,s.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,a2);
}

Compiler output:
main.c:8:16: error: unknown type name 'Point'; did you mean 'int'?
    8 | void koch(int, Point a1,Point a2);
      |                ^~~~~
      |                int
main.c:8:25: error: unknown type name 'Point'; did you mean 'int'?
    8 | void koch(int, Point a1,Point a2);
      |                         ^~~~~
      |                         int
main.c: In function 'main':
main.c:12:5: error: unknown type name 'Point'; use 'struct' keyword to refer to the type
   12 |     Point a1,a2;
      |     ^~~~~
      |     struct 
main.c:17:7: error: request for member 'x' in something not a structure or union
   17 |     a1.x =0;
      |       ^
main.c:18:7: error: request for member 'y' in something not a structure or union
   18 |     a1.y =0;
      |       ^
main.c:19:7: error: request for member 'x' in something not a structure or union
   19 |     a2.x =100;
      |       ^
main.c:20:7: error: request for member 'y' in something not a structure or union
   20 |     a2.y =0;
      |       ^
main.c:24:24: error: request for member 'x' in something not a structure or union
   24 | printf("%.8f %.8f\n",a1.x,a2.y);
      |                        ^
main.c:24:29: error: request for member 'y' in something not a structure or union
   24 | printf("%.8f %.8f\n",a1.x,a2.y);
      |                             ^
main.c:25:5: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   25 |     koch(n,a1,a2);
      |     ^~~~
main.c:27:28: error: request for member 'x' in something not a structure or union
   27 |     printf("%.8f %.8f\n",a2.x ,a2.y);
      |                            ^
main.c:27:34: error: request for member 'y' in something not a structure or union
   27 |     printf("%.8f %.8f\n",a2.x ,a2.y);
      |                                  ^
main.c: At top level:
main.c:32:18: error: unknown type name 'Point'; did you mean 'int'?
   32 | void koch(int n, Point a1 ,Point a2)
      |                  ^~~~~
      |                  int
main.c:32:28: error: unknown type name 'Point'; did you mean 'int'?
   32 | void koch(int n, Point a1 ,Point a2)
      |                            ^~~~~
      |                            int
Language: C

#include <cstdio>
#include <math.h>

struct point{
    double x;
    double y;
};

void koch(int d,point p1,point p2){
    if (d==0)
        return;

    point s,u,t;

    s.x=(2.0*p1.x+1.0*p2.x)/3.0;
    s.y=(2.0*p1.y+1.0*p2.y)/3.0;

    t.x=(1.0*p1.x+2.0*p2.x)/3.0;
    t.y=(1.0*p1.y+2.0*p2.y)/3.01;

    double th=M_PI*60.0/180.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(d-1,p1,s);
    printf("%.8f %.8f\n",s.x,s.y);
    koch(d-1,s,u);
    printf("%.8f %.8f\n",u.x,u.y);
    koch(d-1,u,t);
    printf("%.8f %.8f\n",t.x,t.y);
    koch(d-1,t,p2);

}

int main() {
    point p1,p2;
    int d;
    scanf("%d",&d);

    p1.x=0;
    p1.y=0;
    p2.x=100;
    p2.y=0;

    printf("%.8f %.8f\n",p1.x,p1.y);
    koch(d,p1,p2);
    printf("%.8f %.8f\n",p2.x,p2.y);


    return 0;
}

Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.