Language: C++

#include <iostream>
#include <stdio.h>
#include <cstdio>
#include <string>
#include <algorithm>
#include <limits.h>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <iomanip>
#include <math.h>
#include <cmath> 

#define M_PI 3.14159265358979323846

class Point {
public:
	double x, y;
};

void koch(int n, Point a, Point b)
{
	Point s, t;
	if (n == 0) return;
	s.x = (2 * a.x + b.x) / 3;
	s.y = (2 * a.y + b.y) / 3;
	t.x = (a.x + 2 * b.x) / 3;
	t.y = (a.y + 2 * b.y) / 3;
	Point u;
	double rad = M_PI*(60.0 / 180.0);
	u.x = (t.x - s.x)*cos(rad) - (t.y - s.y)*sin(rad) + s.x;
	u.y = (t.x - s.x)*sin(rad) + (t.y - s.y)*cos(rad) + s.y;
	koch(n - 1, a, s);
	cout << s.x << " " << s.y << endl;
	koch(n - 1, s, u);
	cout << u.x << " " << u.y << endl;
	koch(n - 1, u, t);
	cout << t.x << " " << t.y << endl;
	koch(n - 1, t, b);
}

int main() 
{
	int n;
	cin >> n;
	Point a, b;
	a.x = 0;a.y = 0;
	b.x = 100;b.y = 0;
	cout << fixed << setprecision(8) << a.x << " " << a.y << endl;
	koch(n, a, b);
	cout << fixed << setprecision(8) << b.x << " " << b.y << endl;
}

Compiler output:
a.cc: In function 'void koch(int, Point, Point)':
a.cc:37:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   37 |         cout << s.x << " " << s.y << endl;
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:37:38: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   37 |         cout << s.x << " " << s.y << endl;
      |                                      ^~~~
      |                                      std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc: In function 'int main()':
a.cc:48:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   48 |         cin >> n;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:52:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   52 |         cout << fixed << setprecision(8) << a.x << " " << a.y << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:52:17: error: 'fixed' was not declared in this scope; did you mean 'std::fixed'?
   52 |         cout << fixed << setprecision(8) << a.x << " " << a.y << endl;
      |                 ^~~~~
      |                 std::fixed
In file included from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40:
/usr/include/c++/14/bits/ios_base.h:1104:3: note: 'std::fixed' declared here
 1104 |   fixed(ios_base& __base)
      |   ^~~~~
a.cc:52:26: error: 'setprecision' was not declared in this scope; did you mean 'std::setprecision'?
   52 |         cout << fixed << setprecision(8) << a.x << " " << a.y << endl;
      |                          ^~~~~~~~~~~~
      |                          std::setprecision
In file included from a.cc:13:
/usr/include/c++/14/iomanip:202:3: note: 'std::setprecision' declared here
  202 |   setprecision(int __n)
      |   ^~~~~~~~~~~~
a.cc:52:66: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   52 |         cout << fixed << setprecision(8) << a.x << " " << a.y << endl;
      |                                                                  ^~~~
      |                                                                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~