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:6:1: error: 'Struct' does not name a type; did you mean 'struct'?
    6 | Struct Point{
      | ^~~~~~
      | struct
a.cc:11:17: error: 'Point' has not been declared
   11 | void calc(int m,Point p1,Point p2){
      |                 ^~~~~
a.cc:11:26: error: 'Point' has not been declared
   11 | void calc(int m,Point p1,Point p2){
      |                          ^~~~~
a.cc: In function 'void calc(int, int, int)':
a.cc:15:9: error: 'Point' was not declared in this scope
   15 |         Point s,t,u;
      |         ^~~~~
a.cc:16:9: error: 's' was not declared in this scope
   16 |         s.x=(2*p1.x+1*p2.x)/3.0;
      |         ^
a.cc:16:19: error: request for member 'x' in 'p1', which is of non-class type 'int'
   16 |         s.x=(2*p1.x+1*p2.x)/3.0;
      |                   ^
a.cc:16:26: error: request for member 'x' in 'p2', which is of non-class type 'int'
   16 |         s.x=(2*p1.x+1*p2.x)/3.0;
      |                          ^
a.cc:17:19: error: request for member 'y' in 'p1', which is of non-class type 'int'
   17 |         s.y=(2*p1.y+1*p2.y)/3.0;
      |                   ^
a.cc:17:26: error: request for member 'y' in 'p2', which is of non-class type 'int'
   17 |         s.y=(2*p1.y+1*p2.y)/3.0;
      |                          ^
a.cc:18:9: error: 't' was not declared in this scope
   18 |         t.x=(1*p1.x+2*p2.x)/3.0;
      |         ^
a.cc:18:19: error: request for member 'x' in 'p1', which is of non-class type 'int'
   18 |         t.x=(1*p1.x+2*p2.x)/3.0;
      |                   ^
a.cc:18:26: error: request for member 'x' in 'p2', which is of non-class type 'int'
   18 |         t.x=(1*p1.x+2*p2.x)/3.0;
      |                          ^
a.cc:19:19: error: request for member 'y' in 'p1', which is of non-class type 'int'
   19 |         s.y=(1*p1.y+2*p2.y)/3.0;
      |                   ^
a.cc:19:26: error: request for member 'y' in 'p2', which is of non-class type 'int'
   19 |         s.y=(1*p1.y+2*p2.y)/3.0;
      |                          ^
a.cc:20:9: error: 'u' was not declared in this scope
   20 |         u.x=(t.x-s.x)*(1/2.0)-(t.y-s.y)*(sqrt(3)/2.0)+s.x;
      |         ^
a.cc: In function 'int main()':
a.cc:33:9: error: 'Point' was not declared in this scope
   33 |         Point p1,p2;
      |         ^~~~~
a.cc:34:9: error: 'p1' was not declared in this scope; did you mean 'y1'?
   34 |         p1.x=0; p1.y=0; p2.x=100; p2.y=0;
      |         ^~
      |         y1
a.cc:34:25: error: 'p2' was not declared in this scope
   34 |         p1.x=0; p1.y=0; p2.x=100; p2.y=0;
      |                         ^~
a.cc:39:9: error: expected primary-expression before 'return'
   39 |         return 0;
      |         ^~~~~~