Go: package main

import (
	"fmt"
	"math"
)

func main() {
	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var xa, ya, ra, xb, yb, rb float64
		fmt.Scan(&xa, &ya, &ra, &xb, &yb, &rb)
		// println(xa, ya, ra, xb, yb, rb)
		dis := math.Sqrt((xa-xb)*(xa-xb) + (ya-yb)*(ya-yb))
		if dis + ra < rb {
			fmt.Println(-2)
		} else if dis + rb < ra {
			fmt.Println(2)
		} else if dis > rb + ra {
			fmt.Println(0)
		} else {
			fmt.Println(1)
		}
	}
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <queue>
#include <vector>
#include <math.h>
#include <algorithm>
#include <iomanip>
#include <string>
#include <stack>
#include <cctype>
#include <cstdlib>
using namespace std;

#define INF (1 << 20)
#define EPS (1e-10)
#define EQ(a,b) (fabs((a)-(b)) < EPS)

int main(){
	int n;
	cin >> n;
	for (int i = 0; i < n; ++i) {
		double xa, ya, ra, xb, yb, rb;
		cin >> xa >> ya >> ra >> xb >> yb >> rb;
		double ab = sqrt((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
		if (ab + rb - ra <= EPS) cout << 2 << endl;
		else if (ab + ra - rb <= EPS) cout << -2 << endl;
		else if (ab - ra - rb <= EPS) cout << 1 << endl;
		else cout << 0 << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
	int N;
	cin >> N;
	for(size_t i = 0; i < N; i++)
	{
		long double xa , ya , ra , xb , yb , rb;
		cin >> xa >> ya >> ra >> xb >> yb >> rb;
		long double l2 = ( xa - xb )*( xa - xb ) + ( ya - yb )*( ya - yb );
		if(( ra + rb )*( ra + rb ) < l2)
		{
			cout << 0 << endl;
		} else
		{
			if(ra*ra + l2 <= rb*rb&&rb < ra)
			{
				cout << -2 << endl;
			} else if(rb*rb + l2 <= ra*ra&&ra < rb)
			{
				cout << 2 << endl;
			} else
			{
				cout << 1 << endl;
			}
		}
	}
}

C++: #include <cmath>
#include <cstdio>
#define eps 1e-8
int n; long double xa, ya, ra, xb, yb, rb;
int main() {
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		scanf("%Lf%Lf%Lf%Lf%Lf%Lf", &xa, &ya, &ra, &xb, &yb, &rb);
		long double dist = sqrtl((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb));
		if(dist >= ra + rb - eps) {
			printf("0\n");
		}
		else if(dist <= ra - rb - eps) {
			printf("2\n");
		}
		else if(dist <= rb - ra - eps) {
			printf("-2\n");
		}
		else  {
			printf("1\n");
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>

using namespace std;

double pa[2], pb[2];
double ra, rb;

int solve() {
  double dis = sqrt((pa[0] - pb[0]) * (pa[0] - pb[0])
                + (pa[1] - pb[1]) * (pa[1] - pb[1]));

  if (dis > ra + rb)
    return 0;
  else if (dis + ra < rb)
    return -2;
  else if (dis + rb < ra)
    return 2;
  else
    return 1;
}

int main() {
  int n;
  
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> pa[0] >> pa[1] >> ra >> pb[0] >> pb[1] >> rb;
    cout << solve() << endl;
  }
  return 0;
}