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)
		distance := math.Sqrt((xb-xa)*(xb-xa) + (yb-ya)*(yb-ya))
		if rb+distance < ra {
			fmt.Println(2)
		} else if ra+distance < rb {
			fmt.Println(-2)
		} else if rb+ra >= distance {
			fmt.Println(1)
		} else {
			fmt.Println(0)
		}
	}
}

C++: #include<iostream>
#include<algorithm>
#include<cctype>
#include<cstring>
#include<cstdlib>
#include<vector>
#include<string>
#include<cmath>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
const int N = 2;

int main(){
    int n;
    cin >>n;
    REP(z, n){
        double x[N], y[N], r[N];
        REP(i, N) cin >>x[i] >>y[i] >>r[i];
        double dd = sqrt((x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]));
        if((r[0] + r[1]) >= dd){
            if(dd + r[1] <= r[0]) cout <<2 <<endl;
            else if(dd  + r[0] <= r[1]) cout <<-2 <<endl;
            else cout <<1 <<endl;
        } else cout <<0 <<endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int main(int argc, char **argv)
{
	int n;
	float x1, y1, r1, x2, y2, r2, u;
	cin >> n;
	
	for(int i = 0; i < n; i++){
		cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
		u = (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2);
		
		if(u+r2 < r1){
			cout << "2" << endl;
		} else if(u+r1 < r2){
			cout << "-2" << endl;
		} else if(u-r1 == r2 || ){
			cout << "1" << endl;
		} else {
			cout << "0" << endl;
		}
	}
	
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>

int main()
{
	int n;
	std::cin >> n;
	
	while( n-- ){
	 	double x[2], y[2], r[2];
		for( int i = 0; i < 2; i++ ){
			std::cin >> x[i] >> y[i] >> r[i];
		}
		
		double d = sqrt( pow( x[1] - x[0], 2 ) + pow( y[1] - y[0], 2 ) );
		
		if( d > r[0] + r[1] ){
		 	puts("0");
		}
		else if( d < fabs( r[0] - r[1] ) ){
			std::cout << (  r[0] > r[1] ? 1 : -1 ) * 2 << std::endl;
		}
		else{
			puts("1");
		}
	}

 	return 0;
}