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

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

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

int Ans(Zahyou,Zahyou,int);
main(){
int n;
  Zahyou p1,p2;

  p1.x=0.0;
  p1.y=0.0;
  p2.x=100.0;
  p2.y=0.0;
  
  scanf("%d",&n);
  printf("%f %f\n",p1.x,p1.y);
  Ans(p1,p2,n);
  printf("%f %f\n",p2.x,p2.y);
  return 0;
}


int Ans(Zahyou p1,Zahyou p2,int n){
  Zahyou s,u,t;

  if(n==0)return 0;

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

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

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

Compiler output:
main.c:10:1: error: return type defaults to 'int' [-Wimplicit-int]
   10 | main(){
      | ^~~~
main.c: In function 'Ans':
main.c:47:3: error: expected declaration or statement at end of input
   47 |   Ans(t,p2,n-1);
      |   ^~~
Language: C

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


void Koch(double x1,double y1,double x2,double y2,int dim);
main(){
  int n;
  double M=100.0,m=0.0;

  scanf("%d",&n);

  Koch(0,0,100,0,n);

  printf("%f %f\n",M,m);
  return 0;
}

Compiler output:
main.c:7:1: error: return type defaults to 'int' [-Wimplicit-int]
    7 | main(){
      | ^~~~
Language: C

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


void Koch(double x1,double y1,double x2,double y2,int dim);
main(){
  int n;
  double M=100.0,m=0.0;

  scanf("%d",&n);

  Koch(0,0,100,0,n);

  printf("%f %f\n",M,m);
  return 0;
}


void Koch(double x1,double y1,double x2,double y2,int dim)
{
  double x3,y3,x4,y4,x5,y5;
  double y;

  double s = sin(M_PI/3);
  double c = cos(M_PI/3);

  if(dim <= 0){
    if(y1 < 0){
      y = -y1;
      printf("%f %f\n",x1,y);
    }
    else printf("%f %f\n",x1,y1);
    return;
  }
  x3 = (2*x1 + x2) / 3;
  y3 = (2*y1 + y2) / 3;
  x5 = (x1 + 2*x2) / 3;
  y5 = (y1 + 2*y2) / 3;
  x4 = x3 + (x5-x3)*c + (y5-y3)*s;
  y4 = y3 - (x5-x3)*s + (y5-y3)*c;
  Koch(x1,y1,x3,y3,dim-1);
  Koch(x3,y3,x4,y4,dim-1);
  Koch(x4,y4,x5,y5,dim-1);
  KochCurve(x5,y5,x2,y2,dim-1);
}

Compiler output:
main.c:7:1: error: return type defaults to 'int' [-Wimplicit-int]
    7 | main(){
      | ^~~~
main.c: In function 'Koch':
main.c:45:3: error: implicit declaration of function 'KochCurve' [-Wimplicit-function-declaration]
   45 |   KochCurve(x5,y5,x2,y2,dim-1);
      |   ^~~~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
struct Point{
	double x,y;
};
void koch(int n, Point p1, Point p2){
	if(n==0){
		//cout<<p1.x<<" "<<p1.y<<" "<<p2.x<<" "<<p2.y<<endl;
		return;
	}
	Point s,t,u;
	double co=0.5;
	double si=sqrt(3)/2;
	s.y=(2*p1.y+p2.y)/3;
	s.x=(2*p1.x+p2.x)/3;
	t.y=(p1.y+2*p2.y)/3;
	t.x=(p1.x+2*p2.x)/3;
	u.x=(t.x-s.x)*co-(t.y-s.y)*si+s.x;
	u.y=(t.x-s.x)*si+(t.y-s.y)*co+s.y;
	koch(n-1, p1, s);
	printf("%f.8 %f .8\n", s.x, s1.y);
	koch(n-1, s, u);
	printf("%f.8 %f .8\n", u.x, u.y);
	koch(n-1, u, t);
	printf("%f.8 %f .8\n", t.x, t.y);
	koch(n-1, t, p2);
	printf("%f.8 %f .8\n", p2.x, p2.y);
}
int main(){
	Point p1,p2;
	p1.x=0;
	p1.y=0;
	p2.x=100;
	p2.y=0;
	int n;
	scanf("%d", &n);
	printf("%f.8 %f .8\n", p1.x, p1.y);
	koch(n,p1,p2);
	return 0;
}


Compiler output:
a.cc: In function 'void koch(int, Point, Point)':
a.cc:23:37: error: 's1' was not declared in this scope; did you mean 'si'?
   23 |         printf("%f.8 %f .8\n", s.x, s1.y);
      |                                     ^~
      |                                     si
Language: C++

#include <iostream>
#include <ios>
#include <list>
#include <iomanip>
using namespace std;
#define FOR(it) for(Points::iterator it = list.begin(); it != list.end(); ++it)
struct Point
{
	Point(double _x, double _y) :x(_x), y(_y){}
	double x;
	double y;
};
typedef list<Point> Points;

void CreatePoints(const Point& p1, const Point& p2, Points& ps)
{
	double x1, x2, x3, y1, y2, y3;
	x1 = p1.x + (p2.x - p1.x) / 3;
	x3 = p1.x + 2 * (p2.x - p1.x) / 3;
	y1 = p1.y + (p2.y - p1.y) / 3;
	y3 = p1.y + 2 * (p2.y - p1.y) / 3;
	double r3 = sqrt(3);
	x2 = ((x3 - x1) - r3 * (y3 - y1))/2 + x1;
	y2 = (r3 * (x3 - x1) + (y3 - y1))/2 + y1;
	ps.push_back(Point(x1, y1));
	ps.push_back(Point(x2, y2));
	ps.push_back(Point(x3, y3));
}

void KochCurve(int n, Points& list)
{
	if (0 == n) return;
	Points::iterator it, preit;
	for (it = list.begin(); it != list.end(); ++it){
		if (it == list.begin()){
			preit = it;
			continue;
		}

		Points addPs;
		CreatePoints(*preit, *it, addPs);
		list.insert(it, addPs.begin(), addPs.end());
		preit = it;
	}
	
	return KochCurve(n - 1, list);
}

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	Points list;
	list.push_back(Point(0., 0.));
	list.push_back(Point(100., 0.));
	KochCurve(n, list);
	FOR(it)
		cout << fixed << std::setprecision(5) << it->x << " " << it->y << "\n";

	return 0;
}

Compiler output:
a.cc: In function 'void CreatePoints(const Point&, const Point&, Points&)':
a.cc:22:21: error: 'sqrt' was not declared in this scope
   22 |         double r3 = sqrt(3);
      |                     ^~~~
Language: C++

#include <stdio.h>
#include <math.h>
 
typedef struct{
  double x;
  double y;
}P;
 
void kock(int, P, P);
 
int main(){
 
  int n;
  P p1 = {0.0, 0.0}, p2 = {100.0, 0.0};
 
  scanf("%d", &n);
 
  printf("%f %f\n", p1.x, p1.y);
 
  kock(n, p1, p2);
 
  printf("%f %f\n", p2.x, p2.y);
 
  return 0;
}
 
void kock(int n, P p1, P p2){
 
  P s, t, u;
 
  if(n == 0) return 0;
 
  s.x = (p1.x * 2 + p2.x) / 3;
  s.y = (p1.y * 2 + p2.y) / 3;
  t.x = (p1.x + p2.x * 2) / 3;
  t.y = (p1.y + p2.y * 2) / 3;
  u.x = (t.x - s.x) * cos(M_PI / 3) - (t.y - s.y) * sin(M_PI / 3) + s.x;
  u.y = (t.x - s.x) * sin(M_PI / 3) + (t.y - s.y) * cos(M_PI / 3) + s.y;
 
  kock(n-1, p1, s);
  printf("%f %f\n", s.x, s.y);
  kock(n-1, s, u);
  printf("%f %f\n", u.x, u.y);
  kock(n-1, u, t);
  printf("%f %f\n", t.x, t.y);
  kock(n-1, t, p2);
 
}


 

A

Compiler output:
a.cc: In function 'void kock(int, P, P)':
a.cc:31:21: error: return-statement with a value, in function returning 'void' [-fpermissive]
   31 |   if(n == 0) return 0;
      |                     ^
a.cc: At global scope:
a.cc:53:1: error: 'A' does not name a type
   53 | A
      | ^
Language: C++

#include <cstdio>
#include <iostream>
#include <limits>
#include <algorithm>
using namespace std;

void Koch(double p1x, double p1y, double p2x, double p2y, int n)
{
	if (n <= 0)return;
	double sx = (2 * p1x + 1 * p2x) / 3;
	double sy = (2 * p1y + 1 * p2y) / 3;
	double tx = (1 * p1x + 2 * p2x) / 3;
	double ty = (1 * p1y + 2 * p2y) / 3;
	double ux = (tx - sx) * cos(3.1415926 * 60.0 / 180.0) - (ty - sy) * sin(3.1415926 * 60.0 / 180.0) + sx;
	double uy = (tx - sx) * sin(3.1415926 * 60.0 / 180.0) + (ty - sy) * cos(3.1415926 * 60.0 / 180.0) + sy;
	Koch(p1x, p1y, sx, sy, n - 1);
	cout << sx << " " << sy << endl;
	Koch(sx, sy, ux, uy, n - 1);
	cout << ux << " " << uy << endl;
	Koch(ux, uy, tx, ty, n - 1);
	cout << tx << " " << ty << endl;
	Koch(tx, ty, 100, 0, n - 1);

}
void C()
{
	int N = 0;
	cin >> N;
	cout << 0 << " " << 0 << endl;
	Koch(0, 0, 100, 0, N);
	cout << 100 << " " << 0 << endl;

}
int main()
{
	C();
	return 0;
}

Compiler output:
a.cc: In function 'void Koch(double, double, double, double, int)':
a.cc:14:33: error: 'cos' was not declared in this scope
   14 |         double ux = (tx - sx) * cos(3.1415926 * 60.0 / 180.0) - (ty - sy) * sin(3.1415926 * 60.0 / 180.0) + sx;
      |                                 ^~~
a.cc:14:77: error: 'sin' was not declared in this scope
   14 |         double ux = (tx - sx) * cos(3.1415926 * 60.0 / 180.0) - (ty - sy) * sin(3.1415926 * 60.0 / 180.0) + sx;
      |                                                                             ^~~
Language: C++

#include <list>
#include <utility>
#include <cmath>
using namespace std;

double c = cos(M_PI / 3);
double s = sin(M_PI / 3);
typedef list<pair<double, double> > mylist;
typedef mylist::iterator myitr;

void koch(mylist &lst, int order)
{
	if (order > 0) {
		myitr it1 = lst.begin();
		myitr it2 = lst.begin();
		it2++;
		while (it2 != lst.end()) {
			double x0 = (*it1).first;
			double y0 = (*it1).second;
			double x1 = (*it2).first;
			double y1 = (*it2).second;
			double dx = x1 - x0;
			double dy = y1 - y0;
			lst.insert(it2, make_pair(x0 + dx / 3, y0 + dy / 3));
			lst.insert(it2,
				make_pair(x0 + (dx + dx * c - dy * s) / 3,
					y0 + (dy + dx * s + dy * s) / 3));
			lst.insert(it2, make_pair(x1 - dx / 3, y1 - dy / 3));
			it1 = it2;
			it2++;
		}
		koch(lst, order - 1);
	}
}

int main() {
	int n;
	scanf("%d", &n);
	mylist lst;
	lst.push_back(make_pair(0, 0));
	lst.push_back(make_pair(100, 0));
	koch(lst, n);

	myitr it = lst.begin();
	while(it != lst.end()) {
		printf("%.8f %.8f\n", (*it).first, (*it).second);
		it++;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:9: error: 'scanf' was not declared in this scope
   38 |         scanf("%d", &n);
      |         ^~~~~
a.cc:46:17: error: 'printf' was not declared in this scope
   46 |                 printf("%.8f %.8f\n", (*it).first, (*it).second);
      |                 ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    3 | #include <cmath>
  +++ |+#include <cstdio>
    4 | using namespace std;
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef struct {
	double x,y;
}point;
void koch_curve(int,point,point);
int main(void){
	point p1,p2;
	int num;
	cin >> num;

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

	cout.precision(8);
	cout << p1.x <<" "<< p1.y << endl;
	koch_curve(num,p1,p2);
	cout << p2.x <<" "<< p2.y << endl;
	cout <<c<<endl;
	return 0;
}
void koch_curve(int num,point p1,point p2){
	if(num==0) return;

	point s,t,u;
	double theta =  1.0 / 3  * M_PI;

	//内分点の公式を用いて計算
	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(theta) - (t.y - s.y) * sin(theta) + s.x;
	u.y = (t.x - s.x) * sin(theta) + (t.y - s.y) * cos(theta) + s.y;
	
	koch_curve(num-1,p1,s);
	koch_curve(num-1,s,u);
	koch_curve(num-1,u,t);
	koch_curve(num-1,t,p2);

	cout << s.x << " " << s.y << endl;
	cout << u.x << " " << u.y << endl;
	cout << t.x << " " << t.y << endl;
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: 'c' was not declared in this scope
   21 |         cout <<c<<endl;
      |                ^
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <vector>
#include <stdio.h>

using namespace std;

struct Point {
	double x;
	double y;
};

vector<Point> Points[2];
int zeroOne;
int oneZero;
int n;

void getPoints(Point *p1, Point *p2, Point *s, Point *u, Point *t) {
	s->x = (2.0*p1->x + p2->x) / 3.0;
	s->y = (2.0*p1->y + p2->y) / 3.0;
	t->x = (2.0*p2->x + p1->x) / 3.0;
	t->y = (2.0*p2->y + p1->y) / 3.0;
	double dx = p2->x - p1->x;
	double dy = p2->y = p1->y;
	u->x = (p1->x + p2->x) / 2.0 - dy * sqrt(3.0) / 6.0;
	u->y = (p1->y + p2->y) / 2.0 + dx * sqrt(3.0) / 6.0;
}

void koch() {
	Points[oneZero].clear();
	Point p1, p2, s, u, t;
	for (int i = 0; i < Points[zeroOne].size()-1; ++i) {
		p1 = Points[zeroOne][i];
		p2 = Points[zeroOne][i+1];
		getPoints(&p1, &p2, &s, &u, &t);
		Points[oneZero].push_back(p1);
		Points[oneZero].push_back(s);
		Points[oneZero].push_back(u);
		Points[oneZero].push_back(t);
	}
	Points[oneZero].push_back(Points[zeroOne][Points[zeroOne].size()-1]);
}

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

	Point p1, p2;
	p1.x = 0.0;
	p1.y = 0.0;
	p2.x = 100.0;
	p2.y = 0.0;
	zeroOne = 0;
	oneZero = 1;
	Points[zeroOne].push_back(p1);
	Points[zeroOne].push_back(p2);
	for (int i = 0; i < n; ++i) {
		koch();
		int temp = zeroOne;
		zeroOne = oneZero;
		oneZero = temp;
	}
	for (int i = 0; i < Points[zeroOne].size(); ++i) {
		printf("%.8f %.8f\n", Points[zeroOne][i].x, Points[zeroOne][i].y);
	}

	return 0;
}

Compiler output:
a.cc: In function 'void getPoints(Point*, Point*, Point*, Point*, Point*)':
a.cc:24:45: error: 'sqrt' was not declared in this scope
   24 |         u->x = (p1->x + p2->x) / 2.0 - dy * sqrt(3.0) / 6.0;
      |                                             ^~~~
Language: C++

#include<iostream>
using namespace std;

double a[2]={0.0,0.0},b[2]={100.0,0.0};

#define A 1.0471975511965

void koch(int d,double p1[],double p2[]){
	if(d==0){return;}
	double p3[2],p4[2],p5[2];
	p3[0]=p1[0]+(p2[0]-p1[0])*1.0/3.0;
	p3[1]=p1[1]+(p2[1]-p1[1])*1.0/3.0;
	p5[0]=p1[0]+(p2[0]-p1[0])*2.0/3.0;
	p5[1]=p1[1]+(p2[1]-p1[1])*2.0/3.0;
	p4[0]=(p5[0]-p3[0])*cos(A)-(p5[1]-p3[1])*sin(A)+p3[0];
	p4[1]=(p5[0]-p3[0])*sin(A)+(p5[1]-p3[1])*cos(A)+p3[1];
	koch(d-1,a,p3);
	cout<<p3[0]<<' '<<p3[1]<<endl;
	koch(d-1,p3,p4);
	cout<<p4[0]<<' '<<p4[1]<<endl;
	koch(d-1,p4,p5);
	cout<<p5[0]<<' '<<p5[1]<<endl;
	koch(d-1,p5,b);
}

int main(){
	int n;
	cin>>n;
	cout<<a[0]<<' '<<a[1]<<endl;
	koch(n,a,b);
	cout<<b[0]<<' '<<b[1]<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'void koch(int, double*, double*)':
a.cc:15:29: error: 'cos' was not declared in this scope
   15 |         p4[0]=(p5[0]-p3[0])*cos(A)-(p5[1]-p3[1])*sin(A)+p3[0];
      |                             ^~~
a.cc:15:50: error: 'sin' was not declared in this scope
   15 |         p4[0]=(p5[0]-p3[0])*cos(A)-(p5[1]-p3[1])*sin(A)+p3[0];
      |                                                  ^~~
Language: C++

import math

  
x1 = 0
y1 = 0
x2 = 100
y2 = 0


def koch_curve(i, n, x1, y1, x2, y2):
    x = [0] * 5
    y = [0] * 5
    if i < n:
        x[0] = x1
        y[0] = y1
        x[1] = (2 * x1 + x2) / 3.0
        y[1] = (2 * y1 + y2) / 3.0
        x[2] = (x1 + 2 * x2) / 3.0
        y[2] = (y1 + 2 * y2) / 3.0
        x[3] = (x[2] - x[1]) * math.cos(math.pi/3) - (x[2] - x[1]) * math.sin(math.pi/3) + x[1]
        y[3] = (y[2] - y[1]) * math.cos(math.pi/3) + (y[2] - y[1]) * math.sin(math.pi/3) + y[1]
        x[4] = x2
        y[4] = y2
        koch_curve(i+1, n, x[0], y[0], x[1], y[1])
        print x[1], y[1]
        koch_curve(i+1, n, x[1], y[1], x[3], y[3])
        print x[3], y[3]
        koch_curve(i+1, n, x[3], y[3], x[2], y[2])
        print x[2], y[2]
        koch_curve(i+1, n, x[2], y[2], x[4], y[4])
n = input()  
print x1 y1
koch_curve(0, n, x1, y1, x2,y2)
print x2, y2

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
#include<vector>
#include<iomanip>
using namespace std;

vector<pair<double, double>> v;
vector<vector<pair<double, double>>::iterator> tmpit;

inline void koch(vector<pair<double, double>>::iterator begin, vector<pair<double, double>>::iterator end);
void multikoch(void);
void print(void);

int main() {
	int i, n;
	v.push_back(make_pair(0, 0));
	v.push_back(make_pair(100, 0));
	cin >> n;
	multikoch();
	print();
	return 0;
}

void koch(vector<pair<double, double>>::iterator begin, vector<pair<double, double>>::iterator end) {
	pair<double, double> s, u, t;
	s.first = 2 * begin->first / 3 + end->first / 3;
	s.second = 2 * begin->second / 3 + end->second / 3;
	t.first = begin->first / 3 + 2 * end->first / 3;
	t.second = begin->second / 3 + 2 * end->second / 3;
	u.first = (t.first - s.first) / 2 - (t.second - s.second) * sqrt(3) / 2 + s.first;
	u.second = (t.first - s.first) * sqrt(3) / 2 + (t.second - s.second) / 2 + s.second;
	vector<pair<double, double>> tmp;
	tmp.push_back(s);
	tmp.push_back(u);
	tmp.push_back(t);
	v.insert(++begin, tmp.begin(), tmp.end());
}

void multikoch(void) {
	int i;
	tmpit.clear();
	int vs = v.size();
	for (i = 0; i < vs; i++) {
		tmpit.push_back(v.begin() += i);
	}
	vector<pair<double, double>>::iterator it;
	for (i = 0; i < vs - 1; i++) {
		koch(tmpit[i], tmpit[i + 1]);
	}
}

void print(void) {
	vector<pair<double, double>>::iterator it;
	for (it = v.begin(); it != v.end(); ++it) {
		cout << it->first << " " << it->second << endl;
	}
}

Compiler output:
a.cc: In function 'void koch(std::vector<std::pair<double, double> >::iterator, std::vector<std::pair<double, double> >::iterator)':
a.cc:29:69: error: 'sqrt' was not declared in this scope
   29 |         u.first = (t.first - s.first) / 2 - (t.second - s.second) * sqrt(3) / 2 + s.first;
      |                                                                     ^~~~
Language: C++

#include <iostream>
#include <string>
#include <cstring>
#include <sstream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <chrono>
#include <numeric>
#include <set>
#define _USE_MATH_DEFINES
#include <cmath>
#include <math.h>
#include <iomanip>
#include <list>

using namespace std;

double const PI = atan(1.0) * 4;

class cPoint
{
	double mx;
	double my;
public:
	cPoint() {}

	cPoint(double x, double y)
		: mx(x), my(y)
	{
	}

	cPoint operator+(const cPoint& obj2)
	{
		return cPoint(mx + obj2.mx, my + obj2.my);
	}

	cPoint operator-(const cPoint obj2)
	{
		return cPoint(mx - obj2.mx, my - obj2.my);
	}

	cPoint operator*(const double& d)
	{
		return cPoint(mx * d, my * d);
	}

	cPoint operator/(const double& d)
	{
		if (d != 0.0)
		{
			return cPoint(mx / d, my / d);
		}
		return cPoint(0.0, 0.0);
	}

	bool operator==(const cPoint& obj2)
	{
		if (mx == obj2.mx && my == obj2.my)
			return true;
		return false;
	}

	void operator()(const double& a, const double& b)
	{
		mx = a;
		my = b;
	}

	double getLength(const cPoint& obj)
	{
		return sqrt(obj.mx * obj.mx + obj.my * obj.my);
	}

	cPoint gen(const cPoint& obj1, const cPoint& obj2, const double& angle, const double mul = 1.0)
	{
		cPoint temp = obj2;
		temp = temp - obj1;
		double length = getLength(temp);

		temp.mx = length * mul * cos(angle / 180.0 * PI);
		temp.my = length * mul * sin(angle / 180.0 * PI);

		return temp;
	}

	void display(ostream& out)
	{
		out << mx << " " << my;
	}
};

ostream& operator<<(ostream& o, cPoint& d)
{
	d.display(o);
	return o;
}

class cKochCurve
{
	int mn;
	cPoint m_p1, m_p2;
	list<cPoint> lpPoints;

public:
	
	cKochCurve(int n)
		: mn(n) 
	{
		m_p1(0.0, 0.0);
		m_p2(100.0, 0.0);
		lpPoints.push_front(m_p1);
		lpPoints.push_back(m_p2);

		calc(n, m_p1, m_p2, 0);
	}
	void calc(int, cPoint, cPoint, double);
	void output();
};

void cKochCurve::calc(int n, cPoint p1, cPoint p2, double angle) 
{
	if (n == 0) return;
	list<cPoint>::iterator ilpp;
	for (list<cPoint>::iterator it = lpPoints.begin(); it != lpPoints.end(); ++it)
	{
		if (*it == p1 && it != lpPoints.end())
		{
			list<cPoint>::iterator it2 = it;
			++it2;
			if (*it2 == p2)
			{
				ilpp = it2;
				break;
			}
		}
	}
	cPoint s, t, u;
	s = p1 + (p2 - p1) * (1.0 / 3.0);
	t = p1 + (p2 - p1) * (2.0 / 3.0);
	u = s + t.gen(s, t, angle + 60.0);

	lpPoints.insert(ilpp, s); 
	lpPoints.insert(ilpp, u); 
	lpPoints.insert(ilpp, t); 

	calc(n - 1, p1, s, angle);
	calc(n - 1, s, u, angle + 60);
	calc(n - 1, u, t, angle - 60);
	calc(n - 1, t, p2, angle);
}

void cKochCurve::output()
{
	for (list<cPoint>::iterator it = lpPoints.begin(); it != lpPoints.end(); ++it)
	{
		cout << fixed << setprecision(8) << *it << endl;
	}
}

int main()
{

	cin.tie(0);
	ios::sync_with_stdio(false);

	int n;
	cin >> n;
	cin.cgnore();

	cKochCurve ckc(n);
	ckc.output();

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:171:13: error: 'std::istream' {aka 'class std::basic_istream<char>'} has no member named 'cgnore'; did you mean 'ignore'?
  171 |         cin.cgnore();
      |             ^~~~~~
      |             ignore
Language: C++

#include<stdio.h>
#include<math.h>
using namespace std;

struct Point 
{
    double x;
    double y;
};

void koch(int n, Point a, Point b)
{
    if ( n == 0 ) return;
    double th = M_PI * 60.0 / 180.0;
    Point s, u, t;
    s.x = (a.x * 2.0 + b.x * 1.0) / 3.0;
    s.y = (a.y * 2.0 + b.y * 1.0) / 3.0;
    t.x = (a.x * 1.0 + b.x * 2.0) / 3.0;
    t.y = (a.y * 1.0 + b.x * 2.0) / 3.0;
    u.x = s.x + (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th);
    u.y = s.y + (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th);
    
    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 p1, p2;
    p1.x = 0;
    p1.y = 0;
    p2.x = 100;
    p2.y = 0;
    int n;
    cin >> n;
    printf("%.8f %.8f\n", p1.x, p1.y);
    koch(n, p1, p2);
    printf("%.8f %.8f\n", p2.x, p2.y);
    return 0;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:5: error: 'cin' was not declared in this scope
   42 |     cin >> n;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<math.h>
  +++ |+#include <iostream>
    3 | using namespace std;
Language: C++

#include<stdio.h>
#include<math.h>
using namespace std;

struct Point 
{
    double x;
    double y;
};

void koch(int n, Point a, Point b)
{
    if ( n == 0 ) return;
    double th = M_PI * 60.0 / 180.0;
    Point s, u, t;
    s.x = (a.x * 2.0 + b.x * 1.0) / 3.0;
    s.y = (a.y * 2.0 + b.y * 1.0) / 3.0;
    t.x = (a.x * 1.0 + b.x * 2.0) / 3.0;
    t.y = (a.y * 1.0 + b.x * 2.0) / 3.0;
    u.x = s.x + (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th);
    u.y = s.y + (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th);
    
    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 p1, p2;
    int n;
    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:
a.cc: In function 'int main()':
a.cc:36:20: error: expected ';' before 'p1'
   36 |     scanf("%d", &n)
      |                    ^
      |                    ;
   37 |     p1.x = 0;
      |     ~~
Language: C++

#include<stdio.h>
#include<math.h>
using namespace std;

struct Point 
{
    double x, y;
};

void koch(int n, Point a, Point b)
{
    if ( n == 0 ) return;
    double th = M_PI * 60.0 / 180.0;
    Point s, u, t;
    s.x = (a.x * 2.0 + b.x * 1.0) / 3.0;
    s.y = (a.y * 2.0 + b.y * 1.0) / 3.0;
    t.x = (a.x * 1.0 + b.x * 2.0) / 3.0;
    t.y = (a.y * 1.0 + b.x * 2.0) / 3.0;
    u.x = s.x + (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th);
    u.y = s.y + (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th);
    
    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:
a.cc: In function 'int main()':
a.cc:35:20: error: expected ';' before 'a'
   35 |     scanf("%d", &n)
      |                    ^
      |                    ;
   36 |     a.x = 0;
      |     ~
Language: C++

/**************
*	???????????????
*************/
//for?????????while?????????vector?????????list??????


#include <iostream>
#include <cmath>		//	????§???¢??°
using namespace std;

struct Dot{
	double x;
	double y;
};

//??????
void output_xy(Dot a){
	cout << a.x  <<" "<< a.y << endl;
}

	//2?????????????????¨3????????§?¨??????¨???????????¢??°
void koch(Dot start, Dot end, int n )
{
	if(N == 0){
		return;
	}
	
	
	Dot v;//???
	v.x = (end.x-start.x)/3;
	v.y = (end.y-start.y)/3;
	
	Dot s;//?????¨????????????
	s.x = start.x+v.x;
	s.y = start.y+v.y;
	
	Dot t;
	t.x = start.x+2*v.x;
	t.y = start.y+2*v.y;
	
	Dot u;
	u.x = s.x + v.x*cos(M_PI*60/180)-v.y*sin(M_PI*60/180);
	u.y = s.y + v.x*sin(M_PI*60/180)+v.y*cos(M_PI*60/180);
	
	n --;
	koch(start, s, n);
	output_xy(s);		//????????????????????????
	koch(s, u, n);
	output_xy(u);
	koch(u, t, n);
	output_xy(t);
	koch(t, end, n);

}
//-------------------------------------------------------------
int main()
{
	int n;
	cin >> n;
	
	Dot start;
	start.x =0;
	start.y =0;
	
	Dot end;
	end.x = 100;
	end.y =   0;
	
	output_xy(start);
	koch(start, end, n);
	output_xy(end);
	
	return 0;
}

Compiler output:
a.cc: In function 'void koch(Dot, Dot, int)':
a.cc:24:12: error: 'N' was not declared in this scope
   24 |         if(N == 0){
      |            ^
Language: C++

#include <iostream>
#include <string>
#include <stdio.h>
#include <math>
#define PI 3.14159265
using namespace std;

struct Point {
  double x;
  double y;
};

void kock(int n, Point p1, Point p2) {
  if (n == 0) return;
  Point s, u, t;
  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(60.0 * PI / 180.0) - (t.y - s.y) * sin(60.0 * PI / 180.0) + s.x;
  u.y = (t.x - s.x) * sin(60.0 * PI / 180.0) - (t.y - s.y) * cos(60.0 * PI / 180.0) + s.y;
  kock(n -1, p1, s);
  printf("%.8f %.8f\n", s.x, s.y);
  kock(n -1, s, u);
  printf("%.8f %.8f\n", u.x, u.y);
  kock(n -1, u, t);
  printf("%.8f %.8f\n", t.x, t.y);
  kock(n -1, t, p2);
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n;
  cin >> n;

  Point p1, p2;
  p1.x = 0;
  p1.y = 0;
  p2.x = 100;
  p2.y = 0;
  printf("%.8f %.8f\n", p1.x, p1.y);
  kock(n, p1, p2);
  printf("%.8f %.8f\n", p2.x, p2.y);

  return 0;
}

Compiler output:
a.cc:4:10: fatal error: math: No such file or directory
    4 | #include <math>
      |          ^~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

struct TCoordinate
{
	double X;
	double Y;
};

TCoordinate FindSplitMiddle(TCoordinate A, TCoordinate B)
{
	TCoordinate C = {(A.X + B.X) / 2, (A.Y + B.Y) / 2};
	C.X += (sqrt(3) / 6) * (A.Y - B.Y);
	C.Y += (sqrt(3) / 6) * (B.X - A.X);
	return C;
}

void Koch(int n, const TCoordinate &Start, const TCoordinate &End)
{
	if(n == 0){
		return;
	}
	n--;
	
	TCoordinate SplitStart  = { (2 * Start + End) / 3, (2 * Start + End) / 3};
	TCoordinate SplitMiddle = FindSplitMiddle(Start, End);
	TCoordinate SplitEnd    = { (Start + 2 * End) / 3, (Start + 2 * End) / 3};
	
	Koch(n, Start,       SplitStart );
	cout << SplitStart.X  << ' ' << SplitStart.Y  << endl;
	
	Koch(n, SplitStart,  SplitMiddle);
	cout << SplitMiddle.X << ' ' << SplitMiddle.Y << endl;
	
	Koch(n, SplitMiddle, SplitEnd   );
	cout << SplitEnd.X    << ' ' << SplitEnd.Y    << endl;
	
	Koch(n, SplitEnd,    End        );
}

int main()
{
	//??????2?????¨??°???????????°??????????????\???????????????????????????????§?????????????????????¨???
	int n;
	cin >> n;
	cout <<   0 << ' ' << 0 << endl;
	Koch(n, {0, 0}, {100, 0});
	cout << 100 << ' ' << 0 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'void Koch(int, const TCoordinate&, const TCoordinate&)':
a.cc:27:40: error: no match for 'operator*' (operand types are 'int' and 'const TCoordinate')
   27 |         TCoordinate SplitStart  = { (2 * Start + End) / 3, (2 * Start + End) / 3};
      |                                      ~ ^ ~~~~~
      |                                      |   |
      |                                      int const TCoordinate
a.cc:27:63: error: no match for 'operator*' (operand types are 'int' and 'const TCoordinate')
   27 |         TCoordinate SplitStart  = { (2 * Start + End) / 3, (2 * Start + End) / 3};
      |                                                             ~ ^ ~~~~~
      |                                                             |   |
      |                                                             int const TCoordinate
a.cc:29:48: error: no match for 'operator*' (operand types are 'int' and 'const TCoordinate')
   29 |         TCoordinate SplitEnd    = { (Start + 2 * End) / 3, (Start + 2 * End) / 3};
      |                                              ~ ^ ~~~
      |                                              |   |
      |                                              int const TCoordinate
a.cc:29:71: error: no match for 'operator*' (operand types are 'int' and 'const TCoordinate')
   29 |         TCoordinate SplitEnd    = { (Start + 2 * End) / 3, (Start + 2 * End) / 3};
      |                                                                     ~ ^ ~~~
      |                                                                     |   |
      |                                                                     int const TCoordinate
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <iomanip>

using namespace std;

void solve(){
	int n, an = 2;
	cin >> n;
	vector<pair<double, double>> k_old, k_new;
	k_old.push_back(make_pair(0, 0));
	k_old.push_back(make_pair(100, 0));
	for (int j = 1; j < n + 1; j++){
		for (int i = 0; i < an - 1; i++){
			double x = k_old[i].first;
			double y = k_old[i].second;
			double z = k_old[i + 1].first;
			double w = k_old[i + 1].second;
			double xn = (sqrt(3) / 6) * (y - w + sqrt(3) * (z - x));
			double yn = (sqrt(3) / 6) * (z - x + sqrt(3) * (w - y));
			k_new.push_back(k_old[i]);
			k_new.push_back(make_pair(x + (z - x) / 3, y + (w - y) / 3));
			k_new.push_back(make_pair(x + xn, y + yn));
			k_new.push_back(make_pair(x + 2 * (z - x) / 3, y + 2 * (w - y) / 3));
		}
		k_new.push_back(k_old.back());
		k_old = k_new;
		k_new.clear();
		an = 4 * an - 3;
	}
	for (int i = 0; i < k_old.size(); i++) cout << fixed << setprecision(8) << k_old[i].first << " " << k_old[i].second << endl;
}

signed main(){
	solve();
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:22:38: error: 'sqrt' was not declared in this scope
   22 |                         double xn = (sqrt(3) / 6) * (y - w + sqrt(3) * (z - x));
      |                                      ^~~~
Language: C++

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

struct Point {
	double x, y;
}

int 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:
a.cc:6:2: error: expected ';' after struct definition
    6 | }
      |  ^
      |  ;
a.cc: In function 'int koch(int, Point, Point)':
a.cc:10:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   10 |                 return;
      |                 ^~~~~~
a.cc:30:1: warning: control reaches end of non-void function [-Wreturn-type]
   30 | }
      | ^
Language: C++

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

struct Point {
	double x, y;
};

int 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:
a.cc: In function 'int koch(int, Point, Point)':
a.cc:10:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   10 |                 return;
      |                 ^~~~~~
a.cc:30:1: warning: control reaches end of non-void function [-Wreturn-type]
   30 | }
      | ^
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 ain(){
  Point a,b;
  int n;
  
  scanf("%d", &n):
  
  a.x = 0???
  a.y = 0;
  b.x = 100;
  b.y = 0;
  
  printf("%.8f %.8f\n", a.x, a.y);
  koch(n, a, b);
  printf("%.8f %.8f\n", b.x, b.y);
  
  return 0;
}

Compiler output:
a.cc: In function 'int ain()':
a.cc:33:18: error: expected ';' before ':' token
   33 |   scanf("%d", &n):
      |                  ^
      |                  ;
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 ain(){
  Point a,b;
  int n;
  
  scanf("%d", &n):
  
  a.x = 0???
  a.y = 0;
  b.x = 100;
  b.y = 0;
  
  printf("%.8f %.8f\n", a.x, a.y);
  koch(n, a, b);
  printf("%.8f %.8f\n", b.x, b.y);
  
  return 0;
}

Compiler output:
a.cc: In function 'int ain()':
a.cc:33:18: error: expected ';' before ':' token
   33 |   scanf("%d", &n):
      |                  ^
      |                  ;
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:
a.cc: In function 'void Koch(int, Point, Point)':
a.cc:22:3: error: 'koch' was not declared in this scope; did you mean 'Koch'?
   22 |   koch(n - 1, a, s);
      |   ^~~~
      |   Koch
a.cc: In function 'int main()':
a.cc:44:3: error: 'koch' was not declared in this scope; did you mean 'Koch'?
   44 |   koch(n, a, b);
      |   ^~~~
      |   Koch
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.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, 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, b.y);
  koch(n, a, b);
  printf("%.8f %.8f\n", b.x, b.y);

  return 0;
}

Compiler output:
a.cc: In function 'void koch(int, Point, Point)':
a.cc:12:2: error: expected ',' or ';' before 's'
   12 |  s.x = (2.0*a.x +1.0*b.x)/3.0;
      |  ^
a.cc:20:22: error: expected ')' before 's'
   20 |  printf("%.8f %.8f\n" s.x, s.y);
      |        ~             ^~
      |                      )
a.cc:22:22: error: expected ')' before 'u'
   22 |  printf("%.8f %.8f\n" u.x, u.y);
      |        ~             ^~
      |                      )
a.cc:24:22: error: expected ')' before 't'
   24 |  printf("%.8f %.8f\n" t.x, t.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.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, 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, b.y);
  koch(n, a, b);
  printf("%.8f %.8f\n", b.x, b.y);

  return 0;
} 

Compiler output:
a.cc: In function 'void koch(int, Point, Point)':
a.cc:20:22: error: expected ')' before 's'
   20 |  printf("%.8f %.8f\n" s.x, s.y);
      |        ~             ^~
      |                      )
a.cc:22:22: error: expected ')' before 'u'
   22 |  printf("%.8f %.8f\n" u.x, u.y);
      |        ~             ^~
      |                      )
a.cc:24:22: error: expected ')' before 't'
   24 |  printf("%.8f %.8f\n" t.x, t.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.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:
a.cc:4:25: error: expected ';' at end of member declaration
    4 | struct Point {double x, 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);
   printf("%.8f %.8f\n", b.x, b.y);

   return 0;
}

Compiler output:
a.cc:4:28: error: expected ';' after struct definition
    4 | struct Point {double x, 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:
a.cc:4:28: error: expected ';' after struct definition
    4 | struct Point {double x, 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:
a.cc:4:30: error: expected ';' after struct definition
    4 | struct Point { double x, 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:
a.cc:4:30: error: expected ';' after struct definition
    4 | struct Point { double x, 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 0;

  Point c, d, e;
  double th = M_PI * 60.0 /180.0;

  c,x = (2.0 * a.x +1.0 * b.x)/ 3.0;
  c,y = (2.0 * a.x +1.0 * b.x)/ 3.0;
  d,x = (1.0 * a.x +1.0 * b.x)/ 3.0;
  d,y = (1.0 * a.x +1.0 * b.x)/ 3.0;
  e,x = (d.x - c.x) * cos(th) - (d.x - c.x) * sin(th) + c.x;
  e,x = (d.x - c.x) * sin(th) + (d.x - c.x) * cos(th) + c.x;  
  
  koch( n-1 ,a, c);
  printf("%.8f %.8f\n", c.x, c.y);
  koch( n-1 ,c, e);
  printf("%.8f %.8f\n", e.x, e.y);
  koch( n-1 ,e, d);
  printf("%.8f %.8f\n", d.x, d.y);
  koch( n-1 ,d, b);
  }
  

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

  scanf("%d", &n);

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

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

  return 0;

}

Compiler output:
a.cc:4:30: error: expected ';' after struct definition
    4 | struct Point { double x, y; }]
      |                              ^
      |                              ;
a.cc:4:30: error: expected unqualified-id before ']' token
a.cc: In function 'int main()':
a.cc:41:3: error: 'koch' was not declared in this scope
   41 |   koch( n, a, b);
      |   ^~~~
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 0;

  Point c, d, e;
  double th = M_PI * 60.0 /180.0;

  c.x = (2.0 * a.x +1.0 * b.x)/ 3.0;
  c.y = (2.0 * a.x +1.0 * b.x)/ 3.0;
  d.x = (1.0 * a.x +1.0 * b.x)/ 3.0;
  d.y = (1.0 * a.x +1.0 * b.x)/ 3.0;
  e.x = (d.x - c.x) * cos(th) - (d.x - c.x) * sin(th) + c.x;
  e.x = (d.x - c.x) * sin(th) + (d.x - c.x) * cos(th) + c.x;  
  
  koch( n-1 ,a, c);
  printf("%.8f %.8f\n", c.x, c.y);
  koch( n-1 ,c, e);
  printf("%.8f %.8f\n", e.x, e.y);
  koch( n-1 ,e, d);
  printf("%.8f %.8f\n", d.x, d.y);
  koch( n-1 ,d, b);
  }
  

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

  scanf("%d", &n);

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

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

  return 0;

}

Compiler output:
a.cc:4:30: error: expected ';' after struct definition
    4 | struct Point { double x, y; }]
      |                              ^
      |                              ;
a.cc:4:30: error: expected unqualified-id before ']' token
a.cc: In function 'int main()':
a.cc:41:3: error: 'koch' was not declared in this scope
   41 |   koch( n, a, b);
      |   ^~~~
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 0;

  Point c, d, e;
  double th = M_PI * 60.0 /180.0;

  c.x = (2.0 * a.x +1.0 * b.x)/ 3.0;
  c.y = (2.0 * a.x +1.0 * b.x)/ 3.0;
  d.x = (1.0 * a.x +1.0 * b.x)/ 3.0;
  d.y = (1.0 * a.x +1.0 * b.x)/ 3.0;
  e.x = (d.x - c.x) * cos(th) - (d.y - c.y) * sin(th) + c.x;
  e.x = (d.x - c.x) * sin(th) + (d.y - c.y) * cos(th) + c.x;  
  
  koch( n-1 ,a, c);
  printf("%.8f %.8f\n", c.x, c.y);
  koch( n-1 ,c, e);
  printf("%.8f %.8f\n", e.x, e.y);
  koch( n-1 ,e, d);
  printf("%.8f %.8f\n", d.x, d.y);
  koch( n-1 ,d, b);
  }
  

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

  scanf("%d", &n);

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

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

  return 0;

}

Compiler output:
a.cc:4:30: error: expected ';' after struct definition
    4 | struct Point { double x, y; }]
      |                              ^
      |                              ;
a.cc:4:30: error: expected unqualified-id before ']' token
a.cc: In function 'int main()':
a.cc:41:3: error: 'koch' was not declared in this scope
   41 |   koch( n, a, b);
      |   ^~~~
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 0;

  Point c, d, e;
  double th = M_PI * 60.0 /180.0;

  c.x = (2.0 * a.x +1.0 * b.x)/ 3.0;
  c.y = (2.0 * a.x +1.0 * b.x)/ 3.0;
  d.x = (1.0 * a.x +1.0 * b.x)/ 3.0;
  d.y = (1.0 * a.x +1.0 * b.x)/ 3.0;
  e.x = (d.x - c.x) * cos(th) - (d.y - c.y) * sin(th) + c.x;
  e.x = (d.x - c.x) * sin(th) + (d.y - c.y) * cos(th) + c.y;  
  
  koch( n-1 ,a, c);
  printf("%.8f %.8f\n", c.x, c.y);
  koch( n-1 ,c, e);
  printf("%.8f %.8f\n", e.x, e.y);
  koch( n-1 ,e, d);
  printf("%.8f %.8f\n", d.x, d.y);
  koch( n-1 ,d, b);
  }
  

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

  scanf("%d", &n);

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

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

  return 0;

}

Compiler output:
a.cc:4:30: error: expected ';' after struct definition
    4 | struct Point { double x, y; }]
      |                              ^
      |                              ;
a.cc:4:30: error: expected unqualified-id before ']' token
a.cc: In function 'int main()':
a.cc:41:3: error: 'koch' was not declared in this scope
   41 |   koch( n, a, b);
      |   ^~~~