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":
					r_t++
				}
				t++
			}	else {
				break
			}
			
	}
	fmt.Println(t, r_t, s_t, o_t)
}

C++: // 2014/06/26 Tazoe

#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int cnt0 = 0;
	int cnt1 = 0;
	int cnt2 = 0;
	int cnt3 = 0;

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

		if(a<b){
			swap(a, b);
		}
		if(a<c){
			swap(a, c);
		}

		if(a>=b+c){
			cout << cnt0 << ' ' << cnt1 << ' ' << cnt2 << ' ' << cnt3 << endl;
			break;
		}

		cnt0++;

		if(a*a==b*b+c*c){
			cnt1++;
		}
		else if(a*a<b*b+c*c){
			cnt2++;
		}
		else{
			cnt3++;
		}
	}

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
	int a[3],b,c,d,e;
	b=c=d=e=0;
	while(scanf("%d %d %d",&a[0],&a[1],&a[2])!=EOF){
		sort(a,a+3);
		if(a[0]+a[1]<=a[2]){
				cout << b << " " << c << " " << d << " " << e << endl;
				return 0;
		}
		b++;
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])	c++;
		if(a[0]*a[0]+a[1]*a[1]>a[2]*a[2])	d++;
		if(a[0]*a[0]+a[1]*a[1]<a[2]*a[2])	e++;
	}
}

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

bool istriangle(int a, int b, int c){
    int cnt=0;

    if(a<b+c)cnt+=1;
    if(b<a+c)cnt+=1;
    if(c<a+b)cnt+=1;

    if(cnt==3)return true;
    else return false;
}

int whichtriangle(int a, int b, int c){
    int longest, sub1, sub2;
    if(a>b){
        longest=a;
        sub1=b;
    }
    else {
        longest=b;
        sub1=a;
    }
    if(c>longest){
        sub2=longest;
        longest=c;
    }
    else {
        sub2=c;
    }

    if(longest*longest==sub1*sub1+sub2*sub2)return 1;
    else if(longest*longest>sub1*sub1+sub2*sub2)return 3;
    else return 2;

}

int main(){

    int a, b, c;
    int t=0;
    int types[4]={0, 0, 0, 0};

    while (1){
        cin >> a >> b >> c;
        if(istriangle(a, b, c) == 0)break;

        types[whichtriangle(a, b, c)]+=1;
        t+=1;

    }

    cout << t;
    for(int i=1;i<4;i++){
        cout << " " << types[i];
    }

    cout << endl;

}

C++: #include <iostream>
#include <algorithm>
#include <math.h>
using namespace std;

int main(){
  double a,b,c;
  int cnt[4];
  fill(cnt,cnt+4,0);
  while(cin >> a >> b >> c){
    double array[3];
    int sum = a + b + c;
    int Max = max(a,max(b,c));
    int remain = sum - Max;

    if(Max >= remain){
      continue;
    }

    array[0] = a;
    array[1] = b;
    array[2] = c;
    sort(array,array+3);

    double Max_angle = 0;
    do{
      double tmp = (array[0]*array[0]+array[2]*array[2]-array[1]*array[1])/
	(2*array[0]*array[2]);

      Max_angle = max(Max_angle,acos(tmp));
    }while(next_permutation(array,array+3));

    cnt[0]++;

    if(Max_angle > M_PI / 2.0) cnt[3]++;
    else if(Max_angle < M_PI / 2.0) cnt[2]++;
    else cnt[1]++;

  }
  for(int i=0; i<4; i++){
    if(i == 0) cout << cnt[i];
    else cout << " " << cnt[i];
  }
  cout << endl;
  
  return 0;
}

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

int ans[4] = {0};
int a, b, c;
vector<int> v;

int main() {
  while(1) {
    cin >> a >> b >> c;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    sort(v.begin(), v.end());
    if(v[0] + v[1] <= v[2]) break;
    ++ans[0];
    a = v[0] * v[0] + v[1] * v[1];
    b = v[2] * v[2];
    if(a == b)
      ++ans[1];
    else if(a > b)
      ++ans[2];
    else
      ++ans[3];
    v.erase(v.begin(), v.end());
  }
  cout << ans[0] << " " << ans[1] << " " << ans[2] << " "
       << ans[3] << endl;
  return 0;
}

C++: #include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>     
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <iomanip>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define ld long double
#define rep(a,t) for(int a=0;a<t;a++) 
#define forever while(true)
#define Sort(a) sort(a.begin(),a.end())
#define Reverse(a) reverse(a.begin(),a.end())
#define pb push_back
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	vector <int>a(3);
	a[0] = a[1] = a[2] = 0;
	int choku = 0, ei = 0, don = 0;
	while (cin >> a[0] >> a[1] >> a[2]) {
		Sort(a);
		if (a[0] + a[1] <= a[2])
		{
			continue;
		}
		int a2[3];
		rep(i, 3) {
			a2[i] = a[i] * a[i];
		}
		if (a2[0] + a2[1] == a2[2]) 
		{ 
			choku++;
		}
		else if (a2[0] + a2[1] > a2[2]) 
		{ 
			ei++;
		}
		else 
		{
			don++;
		}
	}
	cout << choku + ei + don << " " << choku << " " << ei << " " << don << endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;

int main()
{
  double a, b, c;
  int chokaku = 0, eikaku = 0, donkaku = 0;
  
  while(1){
    scanf("%lf %lf %lf", &a, &b, &c);
    if ( a + b > c && a + c > b && b + c > a ) {
      if ( a*a + b*b == c*c || a*a + c*c == b*b || b*b + c*c == a*a) {
	chokaku++;
      } else if ( asin(a/b) < M_PI / 2. && asin(a/c) < M_PI / 2. && asin(b/c) < M_PI / 2) {
	eikaku++;
      } else {
	donkaku++;
      }
    } else {
      break;
    }
  }
  
  printf("%d %d %d %d\n", eikaku+donkaku+chokaku, chokaku, donkaku, eikaku);
  
  return (0);
}

C++: #include<iostream>
using namespace std;
int main(){
    int a,b,c,l=0,m=0,n=0,o=0;
    while(1){
         cin>>a>>b>>c;
         if(a+b>c&&b+c>a&&a+c>b){
           l+=1;
           if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a){
             m+=1;
           }
           int j=0;
           if(j<a){
           j+=a;
           }
           if(j<b){
           j+=b;
           }
           if(j<c){
           j+=c;
           }
           if(j==a){
             if(a*a<b*b+c*c){
               n+=1;
             }
             if(a*a>b*b+c*c){
               o+=1;
             }
           }
           else if(j==b){
             if(b*b<a*a+c*c){
               n+=1;
             }
             if(b*b>a*a+c*c){
               o+=1;
             }
           }
           else {
                  if(c*c<b*b+a*a){
                    n+=1;
                  }
                  if(c*c>b*b+a*a){
                    o+=1;
                  }
           }
         }
         else{break;}
     }
     cout<<l<<" "<<m<<" "<<n<<" "<<o<<endl;
     return 0;
}