Go: 
package main
// 三角形の形は辺の長さで決まる． 順番に３つの正整数が与えられたとき， 辺の長さがそれらの値と一致する三角形が存在するかどうかを調べ,
//  存在するなら鋭角三角形，直角三角形，鈍角三角形のいずれかを判定し， 次の入力へ進む． 三角形が存在しないとき， それまでに入力された，
// 三角形，直角三角形，鋭角三角形，鈍角三角形の 個数を空白で区切って出力し， それ以降の入力は無視して終了する
// 入力の中には必ず三角形が存在しないようなものがある と仮定してよい. 入力の行数は判らないが各行には３つの正整数が空白で区切って書かれている．
//  ただし，各整数は100 以下とする.

// return
// 三角形 直角三角形　鈍角三角形 鈍角三角形
import (
	"os"
	"fmt"
	"bufio"
)


var sc = bufio.NewScanner(os.Stdin)

func max(a, b, c int) (int, int, int) {
	if a > b {
		if b > c {
			return a, b, c
		} else {
			return a, c, b
		}
	} else {
		if a > c {
			return b, a, c
		} else {
			return b, c, a
		}
	}
}

func find_trianges(a, b, c int) string {
	a, b, c = max(a, b, c)
	r := b*b + c*c
	if a*a > r {
		return "obtuse_triangle"
	} else if a*a < r {
		return "sharped_triangle"
	} else {
		return "right_triangle"
	}
}

func main() {
	s := bufio.NewScanner(os.Stdin)
	var t, r_t, s_t, o_t int = 0, 0, 0, 0
	for s.Scan() {
		var a, b, c int
		fmt.Sscan(s.Text(), &a, &b, &c)
			a, b, c = max(a, b, c)
			if (a < b + c) {
				r := find_trianges(a, b, c)
				switch r {
				case "right_triangle":
					r_t++
				case "sharped_triangle":
					s_t++
				case "obtuse_triangle":
					o_t++
				}
				t++
			}	else {
				break
			}
			
	}
	fmt.Println(t, r_t, s_t, o_t)
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <stack>
#include <cstring>
 
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) for(int i = 0; i < (n); i++)
#define MP make_pair
#define X first
#define Y second
#define all(v) v.begin(), v.end()
#define rev(v) v.rbegin(), v.rend()

using namespace std;
 
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> P;

const int INF = 1<<29;

int check(int a[3]){
	if(a[2] >= a[1]+a[0]) return -1;
	int x = a[2]*a[2]-a[1]*a[1]-a[0]*a[0];
	if(x > 0) return 2;
	if(x < 0) return 1;
	return 0;
}

int main(){
	int a[3];
	int cnt[3] = {};
	while(1){
		rep(i, 3) cin >> a[i];
		sort(a, a+3);
		if(check(a) == -1) break;
		cnt[check(a)]++;
	}
	cout << cnt[0]+cnt[1]+cnt[2];
	rep(i, 3){
		cout << ' ' << cnt[i];
	}
	cout << endl;

    return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
 
using namespace std;
 
#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
 
template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; }
inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }
 
typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
 
int main(){
  int a, b, c;
  int ans[4] = {};
  while(cin>>a>>b>>c){
    if(!(c > b - a)) break;
    if(!(c > a - b)) break;
    if(!(c < a + b)) break;
    if(a > b) swap(a, b);
    if(b > c) swap(b, c);
    int D = a * a + b * b  - c * c;
    ans[0]++;
    if(D > 0) ans[1]++;
    if(D == 0) ans[2]++;
    if(D < 0) ans[3]++;
  }
  printf("%d %d %d %d\n", ans[0], ans[2], ans[1], ans[3]);
  return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b,c,s=0,s1=0,s2=0,s3=0,q;
	while(cin>>a>>b>>c)
	{
		if(a<b)
		{
			q=a;a=b;b=q;
		}
		if(a<c)
		{
			q=a;a=c;c=q;
		}
		if(a>=b+c)break;
		else
		{
			s++;
			if((a*a)==(b*b)+(c*c))s1++;
			else if((a*a)<(b*b)+(c*c))s2++;
			else if((a*a)>(b*b)+(c*c))s3++;
		}
	}
	cout<<s<<" "<<s1<<" "<<s2<<" "<<s3<<" ";
}

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

using namespace std;

int main()
{
    int acute = 0;
    int obtuse = 0;
    int right = 0;

    while (true) {
        int a, b, c;
        cin >> a >> b >> c;

        auto checkTriangle = [](int a, int b, int c) { return a < (b + c); };
        auto radToDegree = [](double rad) { return rad * 180 / M_PI; };
        auto angle = [radToDegree](int a, int b, int c) {
            auto x = static_cast<double>(b * b + c * c - a * a) / (2 * b * c);
            return radToDegree(acos(x));
        };
        auto isObtuse = [](double theta) {
            return 90.0 < theta && theta < 180.0;
        };

        if (checkTriangle(a, b, c) && checkTriangle(b, a, b) &&
            checkTriangle(c, a, b)) {
            auto theta1 = angle(a, b, c);
            auto theta2 = angle(b, a, c);
            auto theta3 = angle(c, a, b);
            if (theta1 == 90.0 || theta2 == 90.0 || theta3 == 90.0) {
                right += 1;
            }
            else if (isObtuse(theta1) || isObtuse(theta2) || isObtuse(theta3)) {
                obtuse += 1;
            }
            else {
                acute += 1;
            }
        }
        else {
            cout << (acute + obtuse + right) << " " << right << " " << acute
                 << " " << obtuse << endl;
            break;
        }
    }
}

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

using namespace std;

int sankaku,eikaku,tyokkaku,donkaku;
int hen[3];

int main(void){

  sankaku = eikaku = tyokkaku = donkaku = 0;

  while( cin >> hen[0] >> hen[1] >> hen[2] ){

    sort( hen , hen + 3 );
    
    if( hen[2] >= hen[0] +  hen[1] ) continue;
    sankaku++;
    
    for( int i = 0 ; i < 3 ; i++ )
      hen[i] = pow( (double)hen[i] , 2 );
    
    if( hen[2] == hen[0] + hen[1] ) tyokkaku++;
    if( hen[2] < hen[0] + hen[1] ) eikaku++;
    if( hen[2] > hen[0] + hen[1] ) donkaku++;
    
  }
  cout << sankaku << " " << tyokkaku << " " << eikaku << " " << donkaku << endl;
  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int main(){
  int all=0, a=0, b=0, c=0;
  vector<int> data(3);
  bool end = false;

  while(cin >> data[0] >> data[1] >> data[2]){
    if(end) continue;
    sort(data.begin(), data.end());

    if(data[0]+data[1] <= data[2]){
      cout << all << " " << a << " " << b << " " << c << endl;
      end = true;
      continue;
    }

    if(data[0]*data[0] + data[1]*data[1] == data[2]*data[2]) ++a;
    else if(data[0]*data[0] + data[1]*data[1] > data[2]*data[2]) ++b;
    else ++c;

    ++all;
  }
  return 0;
}

C++: #include<cstdio>

int main(void){
    
    int a=0,b=0,c=0;
    int change=0,judge=0,exi=0;
    int right=0,acute=0,obtuse=0,count=0;
    while(true){
        scanf("%d %d %d",&a,&b,&c);
        
        if(c<a){
            change=a;
            a=c;
            c=change;
        }
        if(c<b){
            change=b;
            b=c;
            c=change;
        }
        judge=a*a+b*b-c*c;
        exi=a+b-c;
        if(exi<0){
            break;
        }
        if(judge>0){
            acute++;
        }
        else if(judge==0){
            right++;
        }
        else{
            obtuse++;
        }
        count++;
    }
    
    printf("%d %d %d %d\n",count,right,acute,obtuse);
    return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int ans[4]={0,0,0,0};
	int d[3];
	while(1){
		for(int i=0;i<3;i++)cin>>d[i];
		sort(d,d+3);
		if(d[0]+d[1]<=d[2])break;
		else if(d[0]*d[0]+d[1]*d[1]==d[2]*d[2])ans[1]++;
		else if(d[0]*d[0]+d[1]*d[1]>d[2]*d[2])ans[2]++;
		else ans[3]++;
		ans[0]++;
	}
	
	cout<<ans[0]<<" "<<ans[1]<<" "<<ans[2]<<" "<<ans[3]<<endl;
	return 0;
}