Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 29;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };

int main() {
	int n;
	while ( ~scanf( "%d", &n ) && n != -1 ) {
		double x = 0, y = 0;
		double r = PI / 2;
		for ( int i = 0; i < n; i++ ) {
			r -= PI / 2;
			x += cos( r );
			y += sin( r );
			r = atan2( -y, -x );
		}
		printf( "%f\n%f\n", x, y );
	}
	return 0;
}#include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 29;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };

int main() {
	int n;
	while ( ~scanf( "%d", &n ) && n != -1 ) {
		double x = 0, y = 0;
		double r = PI / 2;
		for ( int i = 0; i < n; i++ ) {
			r -= PI / 2;
			x += cos( r );
			y += sin( r );
			r = atan2( -y, -x );
		}
		printf( "%f\n%f\n", x, y );
	}
	return 0;
}

Compiler output:
a.cc:54:2: error: stray '#' in program
   54 | }#include <bits/stdc++.h>
      |  ^
a.cc:54:3: error: 'include' does not name a type
   54 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:85:21: error: redefinition of 'const double EPS'
   85 | static const double EPS = 1e-10;
      |                     ^~~
a.cc:32:21: note: 'const double EPS' previously defined here
   32 | static const double EPS = 1e-10;
      |                     ^~~
a.cc:86:21: error: redefinition of 'const double PI'
   86 | static const double PI = acos( -1.0 );
      |                     ^~
a.cc:33:21: note: 'const double PI' previously defined here
   33 | static const double PI = acos( -1.0 );
      |                     ^~
a.cc:87:18: error: redefinition of 'const int mod'
   87 | static const int mod = 1000000007;
      |                  ^~~
a.cc:34:18: note: 'const int mod' previously defined here
   34 | static const int mod = 1000000007;
      |                  ^~~
a.cc:88:18: error: redefinition of 'const int INF'
   88 | static const int INF = 1 << 29;
      |                  ^~~
a.cc:35:18: note: 'const int INF' previously defined here
   35 | static const int INF = 1 << 29;
      |                  ^~~
a.cc:89:17: error: redefinition of 'const LL LL_INF'
   89 | static const LL LL_INF = 1152921504606846976;
      |                 ^~~~~~
a.cc:36:17: note: 'const LL LL_INF' previously defined here
   36 | static const LL LL_INF = 1152921504606846976;
      |                 ^~~~~~
a.cc:90:18: error: redefinition of 'const int dx []'
   90 | static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
      |                  ^~
a.cc:37:18: note: 'const int dx [8]' previously defined here
   37 | static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
      |                  ^~
a.cc:91:18: error: redefinition of 'const int dy []'
   91 | static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };
      |                  ^~
a.cc:38:18: note: 'const int dy [8]' previously defined here
   38 | static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };
      |                  ^~
a.cc:93:5: error: redefinition of 'int main()'
   93 | int main() {
      |     ^~~~
a.cc:40:5: note: 'int main()' previously defined here
   40 | int main() {
      |     ^~~~