Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
int n;

struct Point{
	double x;
	double y;
}

void calc(int m,Point p1,Point p2){
	if(m>=n){
		return;
	}
	Point s,t,u;
	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;
	s.y=(1*p1.y+2*p2.y)/3.0;
	u.x=(t.x-s.x)*(1/2.0)-(t.y-s.y)*(sqrt(3)/2.0)+s.x;
	u.x=(t.x-s.x)*(sqrt(3)/2.0)+(t.y-s.y)*(1/2.0)+s.y;
	calc(m+1,p1,s);
	printf("%.8f %.8f\n,s.x,s.y);
	calc(m+1,s,u);
	printf("%.8f %.8f\n,u.x,u.y);
	calc(m+1,u,t);
	printf("%.8f %.8f\n,t.x,t.y);
	calc(m+1,t,p2);
}

int main(){
	std::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);
	calc(0,p1,p2);
	printf("%.8f %.8f\n,p2.x,p2.y);
	
	return 0;
}


Compiler output:
a.cc:23:16: warning: missing terminating " character
   23 |         printf("%.8f %.8f\n,s.x,s.y);
      |                ^
a.cc:23:16: error: missing terminating " character
   23 |         printf("%.8f %.8f\n,s.x,s.y);
      |                ^~~~~~~~~~~~~~~~~~~~~~
a.cc:25:16: warning: missing terminating " character
   25 |         printf("%.8f %.8f\n,u.x,u.y);
      |                ^
a.cc:25:16: error: missing terminating " character
   25 |         printf("%.8f %.8f\n,u.x,u.y);
      |                ^~~~~~~~~~~~~~~~~~~~~~
a.cc:27:16: warning: missing terminating " character
   27 |         printf("%.8f %.8f\n,t.x,t.y);
      |                ^
a.cc:27:16: error: missing terminating " character
   27 |         printf("%.8f %.8f\n,t.x,t.y);
      |                ^~~~~~~~~~~~~~~~~~~~~~
a.cc:35:16: warning: missing terminating " character
   35 |         printf("%.8f %.8f\n,p1.x,p1.y);
      |                ^
a.cc:35:16: error: missing terminating " character
   35 |         printf("%.8f %.8f\n,p1.x,p1.y);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc:37:16: warning: missing terminating " character
   37 |         printf("%.8f %.8f\n,p2.x,p2.y);
      |                ^
a.cc:37:16: error: missing terminating " character
   37 |         printf("%.8f %.8f\n,p2.x,p2.y);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc:9:2: error: expected ';' after struct definition
    9 | }
      |  ^
      |  ;
a.cc: In function 'void calc(int, Point, Point)':
a.cc:24:22: error: expected ')' before ';' token
   24 |         calc(m+1,s,u);
      |                      ^
      |                      )
a.cc:23:15: note: to match this '('
   23 |         printf("%.8f %.8f\n,s.x,s.y);
      |               ^
a.cc:26:22: error: expected ')' before ';' token
   26 |         calc(m+1,u,t);
      |                      ^
      |                      )
a.cc:25:15: note: to match this '('
   25 |         printf("%.8f %.8f\n,u.x,u.y);
      |               ^
a.cc:28:23: error: expected ')' before ';' token
   28 |         calc(m+1,t,p2);
      |                       ^
      |                       )
a.cc:27:15: note: to match this '('
   27 |         printf("%.8f %.8f\n,t.x,t.y);
      |               ^
a.cc: In function 'int main()':
a.cc:36:22: error: expected ')' before ';' token
   36 |         calc(0,p1,p2);
      |                      ^
      |                      )
a.cc:35:15: note: to match this '('
   35 |         printf("%.8f %.8f\n,p1.x,p1.y);
      |               ^
a.cc:39:9: error: expected primary-expression before 'return'
   39 |         return 0;
      |         ^~~~~~