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

#include<stdio.h>
#include<math.h>
typedef struct EndPoint{
  double x;
  double y;
}endpoint;
void knock(int,endpoint,endpoint);
int main(){
  int n;
  endpoint p1,p2;
  p1.x=0.0;
  p1.y=0.0;
  p2.x=100.0;
  p2.y=0.0;

  scanf("%d",&n);
  printf("%.8f %.8f\n",p1.x,p1.y);
  kock(n, p1, p2);
  printf("%.8f %.8f\n",p2.x,p2.y);
  return 0;
}
void knock(int n,endpoint p1,endpoint p2){
  endpoint s,l,u;
  if(n==0)
    return ;

  s.x =(2*p1.x+1*p2.x)/3.0;
  s.y =(2*p1.y+1*p2.y)/3.0;
  l.x =(1*p1.x+2*p2.x)/3.0;
  l.y =(1*p1.y+2*p2.y)/3.0;
  u.x=(l.x-s.x)*cos(M_PI/3)-(l.y-s.y)*sin(M_PI/3)+s.x;
  u.y=(l.x-s.x)*sin(M_PI/3)+(l.y-s.y)*cos(M_PI/3)+s.y;

  knock(n-1,p1,s);
  printf("%.8f %.8f\n",s.x, s.y);
  knock(n-1,s,u);
  printf("%.8f %.8f\n",u.x, u.y); 
  knock(n-1,u,t);
  printf("%.8f %.8f\n",l.x, l.y);
  knock(n-1,t,p2);
}

Compiler output:
main.c: In function 'main':
main.c:18:3: error: implicit declaration of function 'kock'; did you mean 'knock'? [-Wimplicit-function-declaration]
   18 |   kock(n, p1, p2);
      |   ^~~~
      |   knock
main.c: In function 'knock':
main.c:38:15: error: 't' undeclared (first use in this function)
   38 |   knock(n-1,u,t);
      |               ^
main.c:38:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

typedef struct{
	double x,y;
} Point;

int koch(int n,Point p1,Point p2){
	Point s,t,u;
	double degree = M_PI / 3;
	if(n==0) return;
	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)*cos(degree) - (t.y - s.y)*sin(degree) + s.x;
	u.y = (t.x - s.x)*sin(degree) + (t.y-s.y)*cos(degree) + s.y;
	koch(n-1,p1,s);
	printf("%.8f %.8f",s.x,s.y);
	koch(n-1,s,u)
	printf("%.8f %.8f",u.x,u.y);
	koch(n-1,u,t);
	printf("%.8f %.8f",t.x,t.y);
	koxh(n-1,t,p2);
	


int main(){
	int n;
	Point a,b;
	
	scanf("%d",&n);
	
	p1.x = 0;
	p1.y = 0;
	p2.x = 100;
	p2.y = 0;
	
	printf("%.8f %.8f\n",p1.x,p1.y);
	koch(n,p1,p2);
	printf("%.8f %.8f\n",p2.x,p2.y);
	
	return 0;
}

Compiler output:
main.c: In function 'koch':
main.c:11:18: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   11 |         if(n==0) return;
      |                  ^~~~~~
main.c:8:5: note: declared here
    8 | int koch(int n,Point p1,Point p2){
      |     ^~~~
main.c:12:40: error: expected ';' before 's'
   12 |         s.x = (2 * p1.x + 1 * p2.x) / 3
      |                                        ^
      |                                        ;
   13 |         s.y = (2 * p1.y + 1 * p2.y) / 3
      |         ~                               
main.c:20:22: error: expected ';' before 'printf'
   20 |         koch(n-1,s,u)
      |                      ^
      |                      ;
   21 |         printf("%.8f %.8f",u.x,u.y);
      |         ~~~~~~        
main.c:24:9: error: implicit declaration of function 'koxh'; did you mean 'koch'? [-Wimplicit-function-declaration]
   24 |         koxh(n-1,t,p2);
      |         ^~~~
      |         koch
main.c:44:1: error: expected declaration or statement at end of input
   44 | }
      | ^
Language: C

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

typedef struct{
	double x,y;
} Point;

int koch(int n,Point p1,Point p2){
	Point s,t,u;
	double degree = M_PI / 3;
	if(n==0) return;
	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)*cos(degree) - (t.y - s.y)*sin(degree) + s.x;
	u.y = (t.x - s.x)*sin(degree) + (t.y-s.y)*cos(degree) + s.y;
	koch(n-1,p1,s);
	printf("%.8f %.8f",s.x,s.y);
	koch(n-1,s,u)
	printf("%.8f %.8f",u.x,u.y);
	koch(n-1,u,t);
	printf("%.8f %.8f",t.x,t.y);
	koxh(n-1,t,p2);
	


int main(){
	int n;
	Point a,b;
	
	scanf("%d",&n);
	
	p1.x = 0;
	p1.y = 0;
	p2.x = 100;
	p2.y = 0;
	
	printf("%.8f %.8f\n",p1.x,p1.y);
	koch(n,p1,p2);
	printf("%.8f %.8f\n",p2.x,p2.y);
	
	return 0;
}

Compiler output:
main.c: In function 'koch':
main.c:11:18: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   11 |         if(n==0) return;
      |                  ^~~~~~
main.c:8:5: note: declared here
    8 | int koch(int n,Point p1,Point p2){
      |     ^~~~
main.c:20:22: error: expected ';' before 'printf'
   20 |         koch(n-1,s,u)
      |                      ^
      |                      ;
   21 |         printf("%.8f %.8f",u.x,u.y);
      |         ~~~~~~        
main.c:24:9: error: implicit declaration of function 'koxh'; did you mean 'koch'? [-Wimplicit-function-declaration]
   24 |         koxh(n-1,t,p2);
      |         ^~~~
      |         koch
main.c:44:1: error: expected declaration or statement at end of input
   44 | }
      | ^
Language: C

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

typedef struct{
	double x,y;
} Point;

int koch(int n,Point p1,Point p2){
	Point s,t,u;
	double degree = M_PI / 3;
	if(n==0) return;
	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)*cos(degree) - (t.y - s.y)*sin(degree) + s.x;
	u.y = (t.x - s.x)*sin(degree) + (t.y-s.y)*cos(degree) + s.y;
	koch(n-1,p1,s);
	printf("%.8f %.8f",s.x,s.y);
	koch(n-1,s,u);
	printf("%.8f %.8f",u.x,u.y);
	koch(n-1,u,t);
	printf("%.8f %.8f",t.x,t.y);
	koxh(n-1,t,p2);
	


int main(){
	int n;
	Point p1,p2;
	
	scanf("%d",&n);
	
	p1.x = 0;
	p1.y = 0;
	p2.x = 100;
	p2.y = 0;
	
	printf("%.8f %.8f\n",p1.x,p1.y);
	koch(n,p1,p2);
	printf("%.8f %.8f\n",p2.x,p2.y);
	
	return 0;
}

Compiler output:
main.c: In function 'koch':
main.c:11:18: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   11 |         if(n==0) return;
      |                  ^~~~~~
main.c:8:5: note: declared here
    8 | int koch(int n,Point p1,Point p2){
      |     ^~~~
main.c:24:9: error: implicit declaration of function 'koxh'; did you mean 'koch'? [-Wimplicit-function-declaration]
   24 |         koxh(n-1,t,p2);
      |         ^~~~
      |         koch
main.c:44:1: error: expected declaration or statement at end of input
   44 | }
      | ^
Language: C

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

typedef struct{
	double x,y;
} Point;

int koch(int n,Point p1,Point p2){
	Point s,t,u;
	double degree = M_PI / 3;
	if(n==0) return;
	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)*cos(degree) - (t.y - s.y)*sin(degree) + s.x;
	u.y = (t.x - s.x)*sin(degree) + (t.y-s.y)*cos(degree) + s.y;
	koch(n-1,p1,s);
	printf("%.8f %.8f",s.x,s.y);
	koch(n-1,s,u);
	printf("%.8f %.8f",u.x,u.y);
	koch(n-1,u,t);
	printf("%.8f %.8f",t.x,t.y);
	koxh(n-1,t,p2);
}


int main(){
	int n;
	Point p1,p2;
	
	scanf("%d",&n);
	
	p1.x = 0;
	p1.y = 0;
	p2.x = 100;
	p2.y = 0;
	
	printf("%.8f %.8f\n",p1.x,p1.y);
	koch(n,p1,p2);
	printf("%.8f %.8f\n",p2.x,p2.y);
	
	return 0;
}

Compiler output:
main.c: In function 'koch':
main.c:11:18: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   11 |         if(n==0) return;
      |                  ^~~~~~
main.c:8:5: note: declared here
    8 | int koch(int n,Point p1,Point p2){
      |     ^~~~
main.c:24:9: error: implicit declaration of function 'koxh'; did you mean 'koch'? [-Wimplicit-function-declaration]
   24 |         koxh(n-1,t,p2);
      |         ^~~~
      |         koch
Language: C

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

typedef struct {
  double x, y;
} P;

void print(P p){ printf("%.8f %.8f\n", p.x, p.y); }

void plot(int n, P p1, P p2){
  P s, t, u;
  double th = 60.0*(acos(-1)/180.0);
  if ( n == 0 ) return;
  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.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;

  plot(n-1, p1, s);
  print(s);
  plot(n-1, s, u);
  print(u);
  plot(n-1, u, t);
  print(t);
  plot(n-1, t, p2);
}

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

  p1.x = 0;
  p1.y = 0;
  p2.x = 100;
  p2.y = 0;
  print(p1);
  plot(n, p1, p2);
  print(p2);

  return 0;
}

Compiler output:
main.c:30:1: error: return type defaults to 'int' [-Wimplicit-int]
   30 | main(){
      | ^~~~
main.c: In function 'main':
main.c:31:3: error: unknown type name 'Point'; did you mean 'int'?
   31 |   Point p1, p2;
      |   ^~~~~
      |   int
main.c:35:5: error: request for member 'x' in something not a structure or union
   35 |   p1.x = 0;
      |     ^
main.c:36:5: error: request for member 'y' in something not a structure or union
   36 |   p1.y = 0;
      |     ^
main.c:37:5: error: request for member 'x' in something not a structure or union
   37 |   p2.x = 100;
      |     ^
main.c:38:5: error: request for member 'y' in something not a structure or union
   38 |   p2.y = 0;
      |     ^
main.c:39:9: error: incompatible type for argument 1 of 'print'
   39 |   print(p1);
      |         ^~
      |         |
      |         int
main.c:8:14: note: expected 'P' but argument is of type 'int'
    8 | void print(P p){ printf("%.8f %.8f\n", p.x, p.y); }
      |            ~~^
main.c:40:11: error: incompatible type for argument 2 of 'plot'
   40 |   plot(n, p1, p2);
      |           ^~
      |           |
      |           int
main.c:10:20: note: expected 'P' but argument is of type 'int'
   10 | void plot(int n, P p1, P p2){
      |                  ~~^~
main.c:40:15: error: incompatible type for argument 3 of 'plot'
   40 |   plot(n, p1, p2);
      |               ^~
      |               |
      |               int
main.c:10:26: note: expected 'P' but argument is of type 'int'
   10 | void plot(int n, P p1, P p2){
      |                        ~~^~
main.c:41:9: error: incompatible type for argument 1 of 'print'
   41 |   print(p2);
      |         ^~
      |         |
      |         int
main.c:8:14: note: expected 'P' but argument is of type 'int'
    8 | void print(P p){ printf("%.8f %.8f\n", p.x, p.y); }
      |            ~~^
Language: C

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

typedef struct {
  double x, y;
} P;

void print(Point p){ printf("%.8f %.8f\n", p.x, p.y); }

void plot(int n, Point p1, Point p2){
  P s, t, u;
  double th = 60.0*(acos(-1)/180.0);
  if ( n == 0 ) return;
  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.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;

  plot(n-1, p1, s);
  print(s);
  plot(n-1, s, u);
  print(u);
  plot(n-1, u, t);
  print(t);
  plot(n-1, t, p2);
}

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

  p1.x = 0;
  p1.y = 0;
  p2.x = 100;
  p2.y = 0;
  print(p1);
  plot(n, p1, p2);
  print(p2);

  return 0;
}

Compiler output:
main.c:8:12: error: unknown type name 'Point'; did you mean 'int'?
    8 | void print(Point p){ printf("%.8f %.8f\n", p.x, p.y); }
      |            ^~~~~
      |            int
main.c:10:18: error: unknown type name 'Point'; did you mean 'int'?
   10 | void plot(int n, Point p1, Point p2){
      |                  ^~~~~
      |                  int
main.c:10:28: error: unknown type name 'Point'; did you mean 'int'?
   10 | void plot(int n, Point p1, Point p2){
      |                            ^~~~~
      |                            int
main.c:30:1: error: return type defaults to 'int' [-Wimplicit-int]
   30 | main(){
      | ^~~~
main.c: In function 'main':
main.c:31:3: error: unknown type name 'Point'; did you mean 'int'?
   31 |   Point p1, p2;
      |   ^~~~~
      |   int
main.c:35:5: error: request for member 'x' in something not a structure or union
   35 |   p1.x = 0;
      |     ^
main.c:36:5: error: request for member 'y' in something not a structure or union
   36 |   p1.y = 0;
      |     ^
main.c:37:5: error: request for member 'x' in something not a structure or union
   37 |   p2.x = 100;
      |     ^
main.c:38:5: error: request for member 'y' in something not a structure or union
   38 |   p2.y = 0;
      |     ^
main.c:39:3: error: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
   39 |   print(p1);
      |   ^~~~~
      |   lrint
main.c:40:3: error: implicit declaration of function 'plot' [-Wimplicit-function-declaration]
   40 |   plot(n, p1, p2);
      |   ^~~~
Language: C

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

typedef struct {
  double x, y;
} Point;

void print(Point p){ printf("%.8f %.8f\n", p.x, p.y); }

void plot(int n, Point p1, Point p2){
  Point s, t, u;
  double rad = (acos(-1)/180.0) * 60.0;
  if ( n == 0 ) 
return;

  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.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;

  plot(n-1, p1, s);
  print(s);
  plot(n-1, s, u);
  print(u);
  plot(n-1, u, t);
  print(t);
  plot(n-1, t, p2);
}

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

  p1.x = 0;
  p1.y = 0;
  p2.x = 100;
  p2.y = 0;
  print(p1);
  plot(n, p1, p2);
  print(p2);

  return 0;
}

Compiler output:
main.c: In function 'plot':
main.c:20:27: error: 'th' undeclared (first use in this function); did you mean 't'?
   20 |   u.x = (t.x - s.x) * cos(th) - (t.y - s.y ) * sin(th) + s.x;
      |                           ^~
      |                           t
main.c:20:27: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:32:1: error: return type defaults to 'int' [-Wimplicit-int]
   32 | main(){
      | ^~~~
main.c: In function 'main':
main.c:42:8: error: 'n' undeclared (first use in this function); did you mean 'yn'?
   42 |   plot(n, p1, p2);
      |        ^
      |        yn
Language: C

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

typedef struct {
  double x, y;
} Point;

void print(Point p){ printf("%.8f %.8f\n", p.x, p.y); }

void plot(int num, Point p1, Point p2){
  Point s, t, u;
  double rad = 60.0*(acos(-1)/180.0);
  if ( num == 0 ) return;

  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.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;

  plot(num-1, p1, s);
  print(s);
  plot(num-1, s, u);
  print(u);
  plot(num-1, u, t);
  print(t);
  plot(num-1, t, p2);
}

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

  p1.x = 0;
  p1.y = 0;
  p2.x = 100;
  p2.y = 0;
  print(p1);
  plot(num, p1, p2);
  print(p2);

  return 0;
}

Compiler output:
main.c: In function 'plot':
main.c:19:27: error: 'th' undeclared (first use in this function); did you mean 't'?
   19 |   u.x = (t.x - s.x) * cos(th) - (t.y - s.y ) * sin(th) + s.x;
      |                           ^~
      |                           t
main.c:19:27: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:31:1: error: return type defaults to 'int' [-Wimplicit-int]
   31 | main(){
      | ^~~~
Language: C

#include <stdio.h>
#include <math.h>    
void kock(int,double,double,double,double);

    int main(int argc, char const *argv[])
    {
        int n;
        double ret;
        double p1x = 0;
        double p1y = 0;
        double p2x = 100;
        double p2y = 0;
        scanf(%d,&n);
        printf(%f" "%f"?\n",p1x,p1y);
        kock(n,p1x,p1y,p2x,p2y);
        printf(%f" "%f"?\n",p2x,p2y);


        return 0;
    }

    void kock(int n,double p1x,double p1y,double p2x,double p2y){
        double sx,sy,tx,ty,ux,uy;
        double rad = 60;
        if(n==0) return;

        else{
            sx =(2*p1x + 1*p2x)/3;
            sy =(2*p1y + 1*p2y)/3;
            tx =(1*p1x + 2*p2x)/3;
            ty =(1*p1y + 2*p2y)/3;
            ux =(tx-sx)*cos(rad) - (ty-sy)*sin(rad)+sx;
            ux =(tx-sx)*sin(rad) + (ty-sy)*cos(rad)+sy;

            kock(n-1, p1x,p1y,sx,sy);
            printf(%f" "%f"?\n",sx,sy);
            kock(n-1, sx,sy,ux,uy);
            printf(%f" "%f"?\n",ux,uy);
            kock(n-1, ux,uy,tx,ty);
            printf(%f" "%f"?\n",tx,ty);
            kock(n-1, tx,ty,p2x,p2y)

        }


    }

Compiler output:
main.c: In function 'main':
main.c:13:15: error: expected expression before '%' token
   13 |         scanf(%d,&n);
      |               ^
main.c:14:16: error: expected expression before '%' token
   14 |         printf(%f" "%f"?\n",p1x,p1y);
      |                ^
main.c:16:16: error: expected expression before '%' token
   16 |         printf(%f" "%f"?\n",p2x,p2y);
      |                ^
main.c: In function 'kock':
main.c:36:20: error: expected expression before '%' token
   36 |             printf(%f" "%f"?\n",sx,sy);
      |                    ^
main.c:38:20: error: expected expression before '%' token
   38 |             printf(%f" "%f"?\n",ux,uy);
      |                    ^
main.c:40:20: error: expected expression before '%' token
   40 |             printf(%f" "%f"?\n",tx,ty);
      |                    ^
main.c:41:37: error: expected ';' before '}' token
   41 |             kock(n-1, tx,ty,p2x,p2y)
      |                                     ^
      |                                     ;
   42 | 
   43 |         }
      |         ~
Language: C

include <stdio.h>
#include <math.h>    
void kock(int,double,double,double,double);

    int main(int argc, char const *argv[])
    {
        int n;
        double ret;
        double p1x = 0.0;
        double p1y = 0.0;
        double p2x = 100.0;
        double p2y = 0.0;
        scanf("%d",&n);
        printf("%f %f?\n",p1x,p1y);
        kock(n,p1x,p1y,p2x,p2y);
        printf("%f %f?\n",p2x,p2y);


        return 0;
    }

    void kock(int n,double p1x,double p1y,double p2x,double p2y){
        double sx,sy,tx,ty,ux,uy;
        double rad = 60.0;
        if(n==0) return;

        else{
            sx =(2*p1x + 1*p2x)/3;
            sy =(2*p1y + 1*p2y)/3;
            tx =(1*p1x + 2*p2x)/3;
            ty =(1*p1y + 2*p2y)/3;
            ux =(tx-sx)*cos(rad) - (ty-sy)*sin(rad)+sx;
            ux =(tx-sx)*sin(rad) + (ty-sy)*cos(rad)+sy;

            kock(n-1, p1x,p1y,sx,sy);
            printf("%f %f?\n",sx,sy);
            kock(n-1, sx,sy,ux,uy);
            printf("%f %f?\n",ux,uy);
            kock(n-1, ux,uy,tx,ty);
            printf("%f %f?\n",tx,ty);
            kock(n-1, tx,ty,p2x,p2y);

        }


    }

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   13 |         scanf("%d",&n);
      |         ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include <math.h>
  +++ |+#include <stdio.h>
    3 | void kock(int,double,double,double,double);
main.c:13:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   13 |         scanf("%d",&n);
      |         ^~~~~
main.c:13:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |         printf("%f %f?\n",p1x,p1y);
      |         ^~~~~~
main.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'kock':
main.c:36:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   36 |             printf("%f %f?\n",sx,sy);
      |             ^~~~~~
main.c:36:13: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>
#include <math.h>
int koch(double,double,double,double,double);
int main(){
  int n;
  double px1=0.0,py1=0.0;
  double px2=100.0,py2=0.0;
  scanf("%d",&n);
  printf("0.00000000 0.00000000\n");
  koch(px1,py1,px2,py2,n);
  return 0;
}
int koch(double px1,double py1,double px2,double py2,int n){
  if(n==0){
    printf("%f %f\n",px2,py2);
    return 0;
  }
  double Sx,Sy,Tx,Ty,Ux,Uy;
  Sx=(px2-px1)/3+px1;
  Sy=(py2-py1)/3+py1;
  Tx=(px2-px1)*2/3+px1;
  Ty=(py2-py1)*2/3+py1;
  Ux=(cos(M_PI/3)*(Tx-Sx)-sin(M_PI/3)*(Ty-Sy))+Sx;
  Uy=(sin(M_PI/3)*(Tx-Sx)+cos(M_PI/3)*(Ty-Sy))+Sy;
  koch(px1, py1, Sx, Sy, n-1);
  koch(Sx, Sy, Ux, Uy, n-1);
  koch(Ux, Uy, Tx, Ty, n-1);
  koch(Tx, Ty, px2, py2, n-1);
   
}

Compiler output:
main.c:13:5: error: conflicting types for 'koch'; have 'int(double,  double,  double,  double,  int)'
   13 | int koch(double px1,double py1,double px2,double py2,int n){
      |     ^~~~
main.c:3:5: note: previous declaration of 'koch' with type 'int(double,  double,  double,  double,  double)'
    3 | int koch(double,double,double,double,double);
      |     ^~~~
Language: C

#include <stdio.h>
#include <math.h>
 
typedef struct{
    double x,y;
} Point;
 
int koch(int n,Point p1,Point p2){

    Point s,t,u;

    if(d == 0)
    {
      printf("%.8f %.8f\n", p2.x, p2.y);
      return;
    }

    if(n==0) 
     return;
    s.x = (2 * p1.x + 1 * p2.x) / 3.0;
    s.y = (2 * p1.y + 1 * p2.y) / 3.0;
    t.x = (1 * p1.x + 2 * p2.x) / 3.0;
    t.y = (1 * p1.y + 2 * p2.y) / 3.0;
    u.x = (t.x - s.x)*cos60 - (t.y - s.y)*sin60 + s.x;
    u.y = (t.x - s.x)*sin60 + (t.y-s.y)*cos60 + s.y;

    koch(n-1,p1,s);  
    koch(n-1,s,u);
    koch(n-1,u,t);    
    koch(n-1,t,p2);
}
 
 
int main(){
    int n;
    Point p1,p2;
     
    scanf("%d",&n);
     
    p1.x = 0;
    p1.y = 0;
    p2.x = 100;
    p2.y = 0;
     
    printf("%.8f %.8f\n",p1.x,p1.y);
    koch(n,p1,p2);
    printf("%.8f %.8f\n",p2.x,p2.y);
     
    return 0;
}

Compiler output:
main.c: In function 'koch':
main.c:12:8: error: 'd' undeclared (first use in this function)
   12 |     if(d == 0)
      |        ^
main.c:12:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:7: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   15 |       return;
      |       ^~~~~~
main.c:8:5: note: declared here
    8 | int koch(int n,Point p1,Point p2){
      |     ^~~~
main.c:19:6: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   19 |      return;
      |      ^~~~~~
main.c:8:5: note: declared here
    8 | int koch(int n,Point p1,Point p2){
      |     ^~~~
main.c:24:23: error: 'cos60' undeclared (first use in this function)
   24 |     u.x = (t.x - s.x)*cos60 - (t.y - s.y)*sin60 + s.x;
      |                       ^~~~~
main.c:24:43: error: 'sin60' undeclared (first use in this function)
   24 |     u.x = (t.x - s.x)*cos60 - (t.y - s.y)*sin60 + s.x;
      |                                           ^~~~~
Language: C

#include <stdio.h>
#include <math.h>
 
typedef struct{
    double x,y;
} Point;
 
int koch(int n,Point p1,Point p2){

    Point s,t,u;

    if(n == 0)
    {
      printf("%.8f %.8f\n", p2.x, p2.y);
      return;
    }

    s.x = (2 * p1.x + 1 * p2.x) / 3.0;
    s.y = (2 * p1.y + 1 * p2.y) / 3.0;
    t.x = (1 * p1.x + 2 * p2.x) / 3.0;
    t.y = (1 * p1.y + 2 * p2.y) / 3.0;
    u.x = (t.x - s.x)*cos60 - (t.y - s.y)*sin60 + s.x;
    u.y = (t.x - s.x)*sin60 + (t.y-s.y)*cos60 + s.y;

    koch(n-1,p1,s);  
    koch(n-1,s,u);
    koch(n-1,u,t);    
    koch(n-1,t,p2);
}
 
 
int main(){
    int n;
    Point p1,p2;
     
    scanf("%d",&n);
     
    p1.x = 0;
    p1.y = 0;
    p2.x = 100;
    p2.y = 0;
     
    printf("%.8f %.8f\n",p1.x,p1.y);
    koch(n,p1,p2);
    printf("%.8f %.8f\n",p2.x,p2.y);
     
    return 0;
}

Compiler output:
main.c: In function 'koch':
main.c:15:7: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   15 |       return;
      |       ^~~~~~
main.c:8:5: note: declared here
    8 | int koch(int n,Point p1,Point p2){
      |     ^~~~
main.c:22:23: error: 'cos60' undeclared (first use in this function)
   22 |     u.x = (t.x - s.x)*cos60 - (t.y - s.y)*sin60 + s.x;
      |                       ^~~~~
main.c:22:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:43: error: 'sin60' undeclared (first use in this function)
   22 |     u.x = (t.x - s.x)*cos60 - (t.y - s.y)*sin60 + s.x;
      |                                           ^~~~~
Language: C

#include <stdio.h>
#include <iostream>
#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 PI = 3.14*60.0 / 180;

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

	u.x = (t.x - s.x)*cos(PI) - (t.y - s.y)*sin(PI) + s.x;
	u.y = (t.x - s.x)*sin(PI) - (t.y - s.y)*cos(PI) + s.y;

	printf("%.8f %.8f\n", s.x, s.y);
	printf("%.8f %.8f\n", u.x, u.y);
	printf("%.8f %.8f\n", t.x, t.y);


	koch(n - 1, a, s);
	
	koch(n - 1, s, u);
	
	koch(n - 1, u, t);
	
	koch(n - 1, t, b);
   

}




int main(){

	point a, b;
	a.x = 0;
	b.x = 100;
	a.y = 0;
	b.y = 0;
	int n;

	scanf("%d", &n);

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

}

Compiler output:
main.c:2:10: fatal error: iostream: No such file or directory
    2 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
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 PI = 3.14*60.0 / 180;

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

	u.x = (t.x - s.x)*cos(PI) - (t.y - s.y)*sin(PI) + s.x;
	u.y = (t.x - s.x)*sin(PI) - (t.y - s.y)*cos(PI) + s.y;

	printf("%.8f %.8f\n", s.x, s.y);
	printf("%.8f %.8f\n", u.x, u.y);
	printf("%.8f %.8f\n", t.x, t.y);


	koch(n - 1, a, s);
	
	koch(n - 1, s, u);
	
	koch(n - 1, u, t);
	
	koch(n - 1, t, b);
   

}




int main(){

	point a, b;
	a.x = 0;
	b.x = 100;
	a.y = 0;
	b.y = 0;
	int n;

	scanf("%d", &n);

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

}

Compiler output:
main.c:7:18: error: unknown type name 'point'; did you mean 'int'?
    7 | void koch(int n, point a, point b){
      |                  ^~~~~
      |                  int
main.c:7:27: error: unknown type name 'point'; did you mean 'int'?
    7 | void koch(int n, point a, point b){
      |                           ^~~~~
      |                           int
main.c: In function 'main':
main.c:43:9: error: unknown type name 'point'; use 'struct' keyword to refer to the type
   43 |         point a, b;
      |         ^~~~~
      |         struct 
main.c:44:10: error: request for member 'x' in something not a structure or union
   44 |         a.x = 0;
      |          ^
main.c:45:10: error: request for member 'x' in something not a structure or union
   45 |         b.x = 100;
      |          ^
main.c:46:10: error: request for member 'y' in something not a structure or union
   46 |         a.y = 0;
      |          ^
main.c:47:10: error: request for member 'y' in something not a structure or union
   47 |         b.y = 0;
      |          ^
main.c:52:32: error: request for member 'x' in something not a structure or union
   52 |         printf("%.8f %.8f\n", a.x, a.y);
      |                                ^
main.c:52:37: error: request for member 'y' in something not a structure or union
   52 |         printf("%.8f %.8f\n", a.x, a.y);
      |                                     ^
main.c:53:9: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   53 |         koch(n, a, b);
      |         ^~~~
main.c:54:32: error: request for member 'x' in something not a structure or union
   54 |         printf("%.8f %.8f\n", b.x, b.y);
      |                                ^
main.c:54:37: error: request for member 'y' in something not a structure or union
   54 |         printf("%.8f %.8f\n", b.x, b.y);
      |                                     ^
Language: C

#include <stdio.h>

#include <math.h>

typedef struct { double x, y; } point;

void koch(int n, point a, point b){
	if (n == 0) return;

	point s, t, u;
	double PI = 3. 1415926535*60.0 / 180;

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

	u.x = (t.x - s.x)*cos(PI) - (t.y - s.y)*sin(PI) + s.x;
	u.y = (t.x - s.x)*sin(PI) - (t.y - s.y)*cos(PI) + s.y;

	printf("%.8f %.8f\n", s.x, s.y);
	printf("%.8f %.8f\n", u.x, u.y);
	printf("%.8f %.8f\n", t.x, t.y);


	koch(n - 1, a, s);
	
	koch(n - 1, s, u);
	
	koch(n - 1, u, t);
	
	koch(n - 1, t, b);

return 0;
   

}




int main(){

	point a, b;
	a.x = 0;
	b.x = 100;
	a.y = 0;
	b.y = 0;
	int n;

	scanf("%d", &n);

	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: In function 'koch':
main.c:11:24: error: expected ',' or ';' before numeric constant
   11 |         double PI = 3. 1415926535*60.0 / 180;
      |                        ^~~~~~~~~~
main.c:35:8: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   35 | return 0;
      |        ^
main.c:7:6: note: declared here
    7 | void koch(int n, point a, point b){
      |      ^~~~
Language: C

#include <stdio.h>

#include <math.h>

typedef struct { double x, y; } point;

void koch(int n, point a, point b){
	if (n == 0) return;

	point s, t, u;
	double PI = 3. 14159*60.0 / 180;

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

	u.x = (t.x - s.x)*cos(PI) - (t.y - s.y)*sin(PI) + s.x;
	u.y = (t.x - s.x)*sin(PI) - (t.y - s.y)*cos(PI) + s.y;

	printf("%.8f %.8f\n", s.x, s.y);
	printf("%.8f %.8f\n", u.x, u.y);
	printf("%.8f %.8f\n", t.x, t.y);


	koch(n - 1, a, s);
	
	koch(n - 1, s, u);
	
	koch(n - 1, u, t);
	
	koch(n - 1, t, b);

return 0;
   

}




int main(){

	point a, b;
	a.x = 0;
	b.x = 100;
	a.y = 0;
	b.y = 0;
	int n;

	scanf("%d", &n);

	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: In function 'koch':
main.c:11:24: error: expected ',' or ';' before numeric constant
   11 |         double PI = 3. 14159*60.0 / 180;
      |                        ^~~~~
main.c:35:8: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   35 | return 0;
      |        ^
main.c:7:6: note: declared here
    7 | void koch(int n, point a, point b){
      |      ^~~~
Language: C

#include <stdio.h>

#define MAX 100000
#define ?? 3.141592

void calc(float vertex[][2], int deep, int min, int max);

int main() {
	int deep;
	int min, max;
	float vertex[MAX][2];
	int i;
	for (i = 0; i < MAX; i++) {
		vertex[i][0] = -1; //-1??§?????????
	}
	vertex[0][0] = 0;
	vertex[0][1] = 0;
	vertex[MAX - 1][0] = 100;
	vertex[MAX - 1][1] = 0;
	min = 0;
	max = MAX - 1;

	scanf("%d", &deep);

	calc(vertex, deep, min, max);
	
	for (i = 0; i < MAX; i++) {
		if (vertex[i][0] != -1) {
			printf("%lf %lf\n", vertex[i][0], vertex[i][1]);
		}
	}

	return 0;
}

void calc(float vertex[][2], int deep, int min, int max) {
	int s, t, u;
	if (deep <= 0) {
		return;
	}

	s = (max - min) / 3 + min;
	vertex[s][0] = (vertex[max][0] - vertex[min][0]) / 3.0;
	vertex[s][1] = (vertex[max][1] - vertex[min][1]) / 3.0;
	t = (max - min) * 2 / 3 + min;
	vertex[t][0] = (vertex[max][0] - vertex[min][0]) * 2.0 / 3.0;
	vertex[t][1] = (vertex[max][1] - vertex[min][1]) * 2.0 / 3.0;
	u = (max - min) / 2 + min;
	vertex[u][0] = vertex[s][0] + ((vertex[t][0] - vertex[s][0]) / 2 - (vertex[t][1] - vertex[s][1]) * 1.73205080 / 2.0);
	vertex[u][1] = vertex[s][1] + ((vertex[t][0] - vertex[s][0]) * 1.73205080 / 2.0 + (vertex[t][1] - vertex[s][1]) / 2);

	calc(vertex, deep - 1, min, s);
	calc(vertex, deep - 1, s, u);
	calc(vertex, deep - 1, u, t);
	calc(vertex, deep - 1, t, max);
}

Compiler output:
main.c:4:9: error: macro names must be identifiers
    4 | #define ?? 3.141592
      |         ^
Language: C

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

void koch( int n, int ax, int ay, int bx, int by) {
  if ( n == 0 ){
    return;
  }
  int sx, sy, tx, ty, ux, uy;
  double th = 3.14 * 60.0 / 180.0;
  
  sx = (2.0 * ax + 1.0 * bx) / 3.0;
  sy = (2.0 * ay + 1.0 * by) / 3.0;
  tx = (1.0 * ax + 2.0 * bx) / 3.0;
  ty = (1.0 * ay + 2.0 * by) / 3.0;
  ux = (tx - sx) * cos(th) - (ty - sy) * sin(th) + sx;
  uy = (tx - sx) * sin(th) + (ty - sy) * cos(th) + sy;
  
  koch(n - 1, ax, ay, sx, sy);
  printf("%.8f %.8f\n", sx, sy);
  koch(n - 1, sx, sy, ux, uy);
  printf("%.8f %.8f\n", ux, uy);
  koch(n - 1, ux, uy, tx, ty);
  printf("%.8f %.8f\n", tx, ty);
  koch(n - 1, tx, ty, bx, by);
}

int main(){
  int ax, ay, bx, by;
  int n;
  
  scanf("%d", &n);
  
  ax = 0???
  ay = 0;
  bx = 100;
  by = 0;
  
  printf("%.8f %.8f\n", ax, ay);
  koch(n, ax, ay, bx, by);
  printf("%.8f %.8f\n", bx, by);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:33:10: error: expected expression before '?' token
   33 |   ax = 0???
      |          ^
Language: C

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

void koch( int n, int ax, int ay, int bx, int by) {
  double M_PI = 3.14159263;
  if ( n == 0 ){
    return;
  }
  int sx, sy, tx, ty, ux, uy;
  double th = M_PI * 60.0 / 180.0;
  
  sx = (2.0 * ax + 1.0 * bx) / 3.0;
  sy = (2.0 * ay + 1.0 * by) / 3.0;
  tx = (1.0 * ax + 2.0 * bx) / 3.0;
  ty = (1.0 * ay + 2.0 * by) / 3.0;
  ux = (tx - sx) * cos(th) - (ty - sy) * sin(th) + sx;
  uy = (tx - sx) * sin(th) + (ty - sy) * cos(th) + sy;
  
  koch(n - 1, ax, ay, sx, sy);
  printf("%.8f %.8f\n", sx, sy);
  koch(n - 1, sx, sy, ux, uy);
  printf("%.8f %.8f\n", ux, uy);
  koch(n - 1, ux, uy, tx, ty);
  printf("%.8f %.8f\n", tx, ty);
  koch(n - 1, tx, ty, bx, by);
}

int main(){
  int ax, ay, bx, by;
  int n;
  
  scanf("%d", &n);
  
  ax = 0;
  ay = 0;
  bx = 100;
  by = 0;
  
  printf("%.8f %.8f\n", ax, ay);
  koch(n, ax, ay, bx, by);
  printf("%.8f %.8f\n", bx, by);
  
  return 0;
}

Compiler output:
In file included from main.c:2:
main.c: In function 'koch':
main.c:5:10: error: expected identifier or '(' before numeric constant
    5 |   double M_PI = 3.14159263;
      |          ^~~~
Language: C

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

#define M_PI 3.14159265358979 

void koch( int n, int ax, int ay, int bx, int by) {
  long double M_PI = 3.14159265358979;
  int sx, sy, tx, ty, ux, uy;
  double th = M_PI * 60.0 / 180.0;

  if ( n == 0 ){
    return;
  }
  
  sx = (2.0 * ax + 1.0 * bx) / 3.0;
  sy = (2.0 * ay + 1.0 * by) / 3.0;
  tx = (1.0 * ax + 2.0 * bx) / 3.0;
  ty = (1.0 * ay + 2.0 * by) / 3.0;
  ux = (tx - sx) * cos(th) - (ty - sy) * sin(th) + sx;
  uy = (tx - sx) * sin(th) + (ty - sy) * cos(th) + sy;
  
  koch(n - 1, ax, ay, sx, sy);
  printf("%.8f %.8f\n", sx, sy);
  koch(n - 1, sx, sy, ux, uy);
  printf("%.8f %.8f\n", ux, uy);
  koch(n - 1, ux, uy, tx, ty);
  printf("%.8f %.8f\n", tx, ty);
  koch(n - 1, tx, ty, bx, by);
}

int main(){
  int ax, ay, bx, by;
  int n;
  
  scanf("%d", &n);
  
  ax = 0;
  ay = 0;
  bx = 100;
  by = 0;
  
  printf("%.8f %.8f\n", ax, ay);
  koch(n, ax, ay, bx, by);
  printf("%.8f %.8f\n", bx, by);
  
  return 0;
}

Compiler output:
main.c:4:9: warning: "M_PI" redefined
    4 | #define M_PI 3.14159265358979
      |         ^~~~
In file included from main.c:2:
/usr/include/math.h:1121:10: note: this is the location of the previous definition
 1121 | # define M_PI           3.14159265358979323846  /* pi */
      |          ^~~~
main.c: In function 'koch':
main.c:4:14: error: expected identifier or '(' before numeric constant
    4 | #define M_PI 3.14159265358979
      |              ^~~~~~~~~~~~~~~~
main.c:7:15: note: in expansion of macro 'M_PI'
    7 |   long double M_PI = 3.14159265358979;
      |               ^~~~
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 = (20.0*a.x + 1.0*b.x) / 3.0;
   s.y = (20.0*a.y + 1.0*b.y) / 3.0;
   t.x = (10.0*a.x + 2.0*b.x) / 3.0;
   t.y = (10.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:34:4: error: unknown type name 'Point'; use 'struct' keyword to refer to the type
   34 |    Point a, b;
      |    ^~~~~
      |    struct 
main.c:39:5: error: request for member 'x' in something not a structure or union
   39 |    a.x = 0;
      |     ^
main.c:40:5: error: request for member 'y' in something not a structure or union
   40 |    a.y = 0;
      |     ^
main.c:41:5: error: request for member 'x' in something not a structure or union
   41 |    b.x = 100;
      |     ^
main.c:42:5: error: request for member 'y' in something not a structure or union
   42 |    b.y = 0;
      |     ^
main.c:44:27: error: request for member 'x' in something not a structure or union
   44 |    printf("%.8f %.8f\n", a.x, a.y);
      |                           ^
main.c:44:32: error: request for member 'y' in something not a structure or union
   44 |    printf("%.8f %.8f\n", a.x, a.y);
      |                                ^
main.c:45:4: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   45 |    koch(n, a, b);
      |    ^~~~
main.c:46:27: error: request for member 'x' in something not a structure or union
   46 |    printf("%.8f %.8f\n", b.x, b.y);
      |                           ^
main.c:46:32: error: request for member 'y' in something not a structure or union
   46 |    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 = (20.0*a.x + 1.0*b.x) / 3.0;
   s.y = (20.0*a.y + 1.0*b.y) / 3.0;
   t.x = (10.0*a.x + 2.0*b.x) / 3.0;
   t.y = (10.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:34:4: error: unknown type name 'Point'; use 'struct' keyword to refer to the type
   34 |    Point a, b;
      |    ^~~~~
      |    struct 
main.c:39:5: error: request for member 'x' in something not a structure or union
   39 |    a.x = 0;
      |     ^
main.c:40:5: error: request for member 'y' in something not a structure or union
   40 |    a.y = 0;
      |     ^
main.c:41:5: error: request for member 'x' in something not a structure or union
   41 |    b.x = 100;
      |     ^
main.c:42:5: error: request for member 'y' in something not a structure or union
   42 |    b.y = 0;
      |     ^
main.c:44:27: error: request for member 'x' in something not a structure or union
   44 |    printf("%.8f %.8f\n", a.x, a.y);
      |                           ^
main.c:44:32: error: request for member 'y' in something not a structure or union
   44 |    printf("%.8f %.8f\n", a.x, a.y);
      |                                ^
main.c:45:4: error: implicit declaration of function 'koch' [-Wimplicit-function-declaration]
   45 |    koch(n, a, b);
      |    ^~~~
main.c:46:27: error: request for member 'x' in something not a structure or union
   46 |    printf("%.8f %.8f\n", b.x, b.y);
      |                           ^
main.c:46:32: error: request for member 'y' in something not a structure or union
   46 |    printf("%.8f %.8f\n", b.x, b.y);
      |                                ^
Language: C

#include<stdio.h>
#include<math.h>
#define M_PI 3.141592653589

void koch(int n, double ax, double ay, double bx, double by) {
   if (n == 0) {
     return;
   }

   double sx, sy, tx, ty, ux, uy;
   double th = M_PI * 60.0 / 180.0;

   sx = (20.0*ax + 1.0*bx) / 3.0;
   sy = (20.0*ay + 1.0*by) / 3.0;
   tx = (10.0*ax + 2.0*bx) / 3.0;
   ty = (10.0*ay + 2.0*by) / 3.0;
   ux = (tx - sx)*cos(th) - (ty - sy)*sin(th) + sx;
   uy = (tx - sx)*sin(th) + (ty - sy)*cos(th) + sy;

   koch(n-1, a, s);
   printf ("%.8f %.8f\n", sx, sy);

   koch(n-1, s, u);
   printf("%.8f %.8f\n", ux, uy);

   koch(n-1, u, t);
   printf("%.8f %.8f\n", tx, ty);

   koch(n-1, tx, ty, bx, by);
}

int main () {
   double ax, ay, bx, by;
   int n;

   scanf ("%d", &n);

   ax = 0;
   ay = 0;
   bx = 100;
   by = 0;

   printf("%.8f %.8f\n", ax, ay);
   koch(n, ax, ay, bx, by);
   printf("%.8f %.8f\n", bx, by);

   return 0;
}

Compiler output:
main.c:3:9: warning: "M_PI" redefined
    3 | #define M_PI 3.141592653589
      |         ^~~~
In file included from main.c:2:
/usr/include/math.h:1121:10: note: this is the location of the previous definition
 1121 | # define M_PI           3.14159265358979323846  /* pi */
      |          ^~~~
main.c: In function 'koch':
main.c:20:14: error: 'a' undeclared (first use in this function); did you mean 'ay'?
   20 |    koch(n-1, a, s);
      |              ^
      |              ay
main.c:20:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:17: error: 's' undeclared (first use in this function); did you mean 'sy'?
   20 |    koch(n-1, a, s);
      |                 ^
      |                 sy
main.c:20:4: error: too few arguments to function 'koch'
   20 |    koch(n-1, a, s);
      |    ^~~~
main.c:5:6: note: declared here
    5 | void koch(int n, double ax, double ay, double bx, double by) {
      |      ^~~~
main.c:23:17: error: 'u' undeclared (first use in this function); did you mean 'uy'?
   23 |    koch(n-1, s, u);
      |                 ^
      |                 uy
main.c:23:4: error: too few arguments to function 'koch'
   23 |    koch(n-1, s, u);
      |    ^~~~
main.c:5:6: note: declared here
    5 | void koch(int n, double ax, double ay, double bx, double by) {
      |      ^~~~
main.c:26:17: error: 't' undeclared (first use in this function); did you mean 'th'?
   26 |    koch(n-1, u, t);
      |                 ^
      |                 th
main.c:26:4: error: too few arguments to function 'koch'
   26 |    koch(n-1, u, t);
      |    ^~~~
main.c:5:6: note: declared here
    5 | void koch(int n, double ax, double ay, double bx, double by) {
      |      ^~~~
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:43:30: error: expected ';' before 'koch'
   43 |   printf("%8f %8f\n",a.x,a.y)
      |                              ^
      |                              ;
   44 |   koch(n,a,b)
      |   ~~~~