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 <algorithm>
#include <cstdio>
#include <cstdlib>
using namespace std;

constexpr inline int square(int x) {
	return x * x;
}

int main() {
	int edge[3];
	int triangle = 0;
	int right	 = 0;
	int acute	 = 0;
	int obtuse	 = 0;

	while(scanf("%d %d %d", edge, edge + 1, edge + 2) == 3) {
		sort(edge, edge + 3);

		if(edge[0] + edge[1] <= edge[2]) {
			printf("%d %d %d %d\n", triangle, right, acute, obtuse);
			break;;
		}

		++triangle;
		const int a = square(edge[0]) + square(edge[1]);
		const int b = square(edge[2]);

		if(a == b) ++right;
		else if(a > b) ++acute;
		else ++obtuse;
	}

	return EXIT_SUCCESS;
}

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

using namespace std;

int main(){

  vector<int> a(3);
  int w = 0;
  int x = 0;
  int y = 0;
  int z = 0;

  while(1){
    cin >> a[0] >> a[1] >> a[2];
  
    if(a[0]+a[1] > a[2] && a[1]+a[2] > a[0] && a[2]+a[0] > a[1]){
      w++;

      sort(a.begin(),a.end());

      if(a[2]*a[2] == a[0]*a[0] + a[1]*a[1])
	x++;
      else if(a[2]*a[2] < a[0]*a[0] + a[1]*a[1])
	y++;
      else if(a[2]*a[2] > a[0]*a[0] + a[1]*a[1])
	z++;
    }
    else
      break;
  }

  cout << w << " " << x << " " << y << " " << z << endl;
  
}

C++: #include <bits/stdc++.h>
using namespace std;

int main()
{
  int a, b, c;
  int x = 0, y = 0, z = 0, w = 0;
  while (true)
  {
    cin >> a >> b >> c;
    int len = a + b + c;
    int nmax = max(a, max(b, c));
    int nmin = min(a, min(b, c));
    int nmid = len - nmax - nmin;
    if (nmax < nmin + nmid)
    {
      x++;
      if (nmin * nmin + nmid * nmid == nmax * nmax)
        y++;
      else if (nmin * nmin + nmid * nmid > nmax * nmax)
        z++;
      else
        w++;
    }
    else
      break;
  }

  cout << x << ' ' << y << ' ' << z << ' ' << w << endl;

  return 0;
}

C++: #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <iterator>
#include <stack>
using namespace std;

/*
const int MAX=1000;
vector<vector<int> > memo(MAX,vector<int>(MAX));
vector<vector<int> > done(MAX,vector<int>(MAX));
int dfs(vector<vector<int> > vi,int i,int j,int sum);

int main(){
	//ios::sync_with_stdio(false);
	//cin.tie(0);
	int m,n;
	while(cin>>m>>n&&m!=0&&n!=0){
		vector<vector<int> > ice(m,vector<int>(n));
		int ans=0;
		for(int i=0; i<MAX; ++i){
			for(int j=0; j<MAX; ++j){
				memo[i][j]=0;
				done[i][j]=0;
			}
		}
		for(int i=0; i<n; ++i){
			for(int j=0; j<m; ++j){
				cin >> ice[j][i];
			}
		}
		for(int i=0; i<n; ++i){
			for(int j=0; j<m; ++j){
				if(ice[i][j]==1) {
					ans=max(ans,dfs(ice,i,j,0));
				}
			}
		}
		cout << ans << "\n";
	}
	return 0;
}

int dfs(vector<vector<int> > vi,int i,int j,int sum){
	if(done[i][j]==1) return memo[i][j];
	if(i+1>=vi.size()&&j+1>=vi[i].size()&&i-1<0&&j-1<0&&vi[i+1][j]==0&&vi[i][j+1]==0&&vi[i-1][j]==0&&vi[i][j-1]==0) return sum;
	done[i][j]=1;
	++sum;
	if(i+1<vi.size()) memo[i][j]=dfs(vi,i+1,j,sum+1);
	if(j+1<vi[i].size()) memo[i][j]=dfs(vi,i,j+1,sum+1);
	if(i-1>=0) memo[i][j]=dfs(vi,i-1,j,sum+1);
	if(j-1>=0) memo[i][j]=dfs(vi,i,j-1,sum+1);
	return memo[i][j]; 
}
*/

int main(){
	vector<int> n(3);
	vector<int> cnt(4);
	while(cin>> n[0] >> n[1] >> n[2]){
		int MAX;
		if(n[0]>=n[1]&&n[0]>=n[2]) {
			MAX=n[0];
			if(MAX>=n[1]+n[2]) break;
			if(MAX*MAX==n[1]*n[1]+n[2]*n[2]) ++cnt[1];
			if(MAX*MAX<n[1]*n[1]+n[2]*n[2]) ++cnt[2];
			if(MAX*MAX>n[1]*n[1]+n[2]*n[2]) ++cnt[3];
		}
		else if(n[1]>=n[0]&&n[1]>=n[2]) {
			MAX=n[1];
			if(MAX>=n[0]+n[2]) break;
			if(MAX*MAX==n[0]*n[0]+n[2]*n[2]) ++cnt[1];
			if(MAX*MAX<n[0]*n[0]+n[2]*n[2]) ++cnt[2];
			if(MAX*MAX>n[0]*n[0]+n[2]*n[2]) ++cnt[3];
		}
		else if(n[2]>=n[0]&&n[2]>=n[1]) {
			MAX=n[2];
			if(MAX>=n[0]+n[1]) break;
			if(MAX*MAX==n[1]*n[1]+n[0]*n[0]) ++cnt[1];
			if(MAX*MAX<n[1]*n[1]+n[0]*n[0]) ++cnt[2];
			if(MAX*MAX>n[1]*n[1]+n[0]*n[0]) ++cnt[3];
		}
		++cnt[0];
	}
	for(int i=0; i<4; ++i){
		cout << cnt[i] << " ";
	}
	cout << "\n";
	return 0;
}

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

using namespace std;

int main() {
	
	int Length[3];
	int Triangle[4] = {0};
	bool flag = 0;
	
	while( cin >> Length[0] >> Length[1] >> Length[2]) {
	
	sort(Length, Length+3);
	
	if( Length[0] + Length[1] <= Length[2] ) flag = 1;
	if(flag == 1) continue;
	
	if( pow(Length[0], 2) + pow(Length[1], 2) == pow(Length[2], 2) )
	Triangle[1]++;
	
	else if( pow(Length[0], 2) + pow(Length[1], 2) < pow(Length[2], 2) )
	Triangle[2]++;
	
	else
	Triangle[3]++;
	
	}
	Triangle[0] += ( Triangle[1] + Triangle[2] + Triangle[3] );
	cout << Triangle[0] << " " << Triangle[1] << " "
		 << Triangle[2] << " " << Triangle[3] << "\n";
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
using namespace std;
int main() {
	vector<int> a(3);
	int sya, el,ei=0,tyo=0,don=0;
	while (1) {
		for (int i = 0; i < 3; ++i) {
			cin >> a[i];
		}
		sort(a.begin(), a.end());
		el = pow(a[0], 2) + pow(a[1], 2);
		sya = pow(a[2], 2);
		if (a[0] + a[1] <= a[2])break;
		else if (sya == el)tyo++;
		else if (sya < el)ei++;
		else if (sya > el)don++;
	}
	cout << tyo + ei + don << " " << tyo << " " << ei << " " << don << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int a[100], b[100], c[100],d,e,f,n;
	n = 0;
	d = 0;
	e = 0;
	f = 0;
	while (n <= 100)
	{
		cin >> a[n] >> b[n] >> c[n];
		if (a[n] + b[n] <= c[n] || a[n] + c[n] <= b[n] || b[n] + c[n] <= a[n])
			break;
		else
		{
			n++;
			if (a[n] * a[n] + b[n] * b[n] == c[n] * c[n] || a[n] * a[n] + c[n] * c[n] == b[n] * b[n] || b[n] * b[n] + c[n] * c[n] == a[n] * a[n])
			{
				d++;
			}
			else if (a[n] * a[n] + b[n] * b[n] > c[n] * c[n] || a[n] * a[n] + c[n] * c[n] > b[n] * b[n] || b[n] * b[n] + c[n] * c[n] > a[n] * a[n])
			{
				e++;
			}
			else f++;
		}
	}
	cout << n<<" "<<d<<" "<<e<<" "<<f<<endl;
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int a[3];
	int t = 0, x = 0, y = 0, z = 0;
	bool b = true;
	while (cin >> a[0] >> a[1] >> a[2]){
		if (!b)continue;
		sort(a, a + 3);
		if (a[0] + a[1] <= a[2]){
			b = false;
			continue;
		}else{
			t++;
			if		(a[0] * a[0] + a[1] * a[1] == a[2] * a[2])y++;
			else if (a[0] * a[0] + a[1] * a[1] <= a[2] * a[2])z++;
			else if (a[0] * a[0] + a[1] * a[1] >= a[2] * a[2])x++;
		}
		cout << t << ' ' << x << ' ' << y << ' ' << z << endl;
	}
	cout << t << ' ' << x << ' ' << y << ' ' << z << endl;
}