Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	max := 0.0
	min := 1000000.0
	for sc.Scan() {
		n, _ := strconv.ParseFloat(sc.Text(), 64)
		if max < n {
			max = n
		}
		if min > n {
			min = n
		}
	}
	fmt.Println(max - min)
}

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

int main()
{
  double max = 0, min = 1000000000;
  double d = 0;
  while(scanf("%lf", &d) != EOF)
  {
    max = max < d ? d : max;
    min = min > d ? d : min;
  }
  printf("%lf\n", max - min);
  return 0;
}

C++: #include <bits/stdc++.h>
  
using namespace std;
  
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)
  
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()
  
#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

#define INF 1000000000

typedef long double Real;
typedef complex<Real> P;
Real dot(P a,P b){return real(conj(a)*b);}
Real cross(P a,P b){return imag(conj(a)*b);}

bool e[52525];

int main(){
  float mxh=-1, mnh=1e18;
  float height;
  while(~scanf("%f",&height)){
    if(height==-1.f)break;
    mxh = max(mxh,height);
    mnh = min(mnh,height);
  }
  cout.precision(4);
  cout<<fixed<<(mxh-mnh)<<endl;
  return 0;
}

C++: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace ConsoleApplication26
{
    class Program
    {
        static void Main(string[] args)
        {
            double b, c;
            c=0;b=1<<29;
            string line;
            while((line=Console.ReadLine())!=null)
            {
                double a = double.Parse(line);
                if (b < a)
                    b = a;
                if (c > a)
                    c = a;
            }
            Console.WriteLine(b - c);
        }
    }
}

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

int main(void){

  double mountain;
  double Max = 0;
  double Min = 999999;
  while( cin >> mountain ){
    Max = max( mountain , Max );
    Min = min( mountain , Min );
  }
  printf("%.1f",Max - Min);
  return 0;
}

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main(){
	int i = 0, h[50] = {0};
	double height;
	
	while(cin >> height){
		h[i] == height;
		i ++;
	}
	
	int N = sizeof(h) + 1;
	
	double max = h[0], min = h[0];
	for(int i = 1; i < N; i++){
		if(max < h[i]) max = h[i];
	}
	for(int i = 1; i < N; i++){
		if(min > h[i]) min = h[i];
	}
	
	double ans = max - min;
	cout << fixed << setprecision(1) << ans << endl;
}

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

using namespace std;

int main()
{
	double takasa;
	double ans;
    vector<double>  data;


	while(cin >> takasa)
	{
		data.push_back(takasa);
	}

	stable_sort(data.begin(), data.end());

	ans = data.back() - data.front();

	cout << ans << endl;

	return 0;

}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<double> high;
  double h;
  while(cin >>h) high.push_back(h);
  sort(high.begin(),high.end());
  cout <<high[high.size()-1]-high[0]<<endl;
  return 0;
}

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

int main(){
  double xmax=0,xmin=INT_MAX,ans,n[100000];

  int i=0;
  while(cin >> n[i]){
    xmax=max(xmax,n[i]);
    xmin=min(xmin,n[i]);
    i++;
}

  cout << xmax-xmin << endl;





}

C++: #include <string>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <utility>
#include <algorithm>
#include <numeric>
#include <iostream>

using namespace std;
template<class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }

int main()
{
	vector<double> v;
	double d;
	while(cin>>d) v.push_back(d);
	printf("%.2lf",*max_element(v.begin(),v.end()) - *min_element(v.begin(),v.end()));
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>


using namespace std;


int main()
{
	double ma = DBL_MIN;
	double mi = DBL_MAX;
	double al;
	while (scanf("%lf", &al) != EOF)
	{
		if (al > ma)
			ma = al;
		if (al < mi)
			mi = al;
	}

	printf("%.1f\n", ma-mi);

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  double a,ans;
  double tans = 0,hans = 0;
  cin >> a;
  tans = a;
  hans = a;
  while(cin>>a){
    if(tans>a) tans = a;
    if(hans<a) hans = a;
  }
  ans = hans - tans;
  cout << ans << endl;
  return 0;
}

C++: #include <vector>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <iterator>
#include <string>
using namespace std;

int main(){
	const string tmp(1048576, '0');

	istream_iterator<double> first(cin), last;
	vector<double> v(first, last);
	printf("%f", *max_element(v.begin(), v.end()) - *min_element(v.begin(), v.end()));
	
	for(int i = 0; i < 4; ++i){
		fputs(tmp.c_str(), stdout);
		fflush(stdout);
	}
	
	puts("");
}

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

int main()
{
	float n,max=0.0,min=0.0;
	
	while(cin>>n){
		if(max<n){
			max=n;
		}
		if(min==0){
			min=n;
		}else if(min>n){
			min=n;
		}
	}
	
	cout << max - min;
	
	return 0;
}

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

using namespace std;

int main(void){
  double d;
  vector<double> v;

  while(cin >> d){
    v.push_back(d);
  }

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

  cout << v.at(v.size() - 1) - v.at(0) << endl;
  

  return 0;
}

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

int main()
{
	int i;
	double temp,res;
	priority_queue<double> pq;
	for (i = 1; scanf("%lf",&temp) != EOF;i++) {
		pq.push(temp);
	}
	res = pq.top();
	for (int j = 0; j < i - 1; j++)pq.pop();
	res -= pq.top();
	printf("%lf",res);
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void) {
    double h, max_h = 0, min_h = 1e100;
    while (true) {
        cin >> h;
        if (h > max_h) max_h = h;
        else if (h < min_h) min_h = h;
        if (cin.eof()) break;
    }
    cout << (max_h - min_h) << endl;
    return 0;
}

C++: #include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cctype>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define IREP(it,array) for(vector<int>::iterator it=array.begin(); it!=array.end(); ++it)

int main()
{
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(6);

  vector<double> nums;
  double h;
  while(cin>>h){
    nums.push_back(h);
  }

  vector<double>::iterator min_it = min_element( nums.begin(), nums.end() );
  vector<double>::iterator max_it = max_element( nums.begin(), nums.end() );

  cout << *max_it - *min_it << endl;

  return 0;
}

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main(){
	double max = -1.e10;
	double min =  1.e10;
	double m;
	while(cin >> m){
		if(max<m) max=m;
		if(min>m) min=m;
	}
	cout << setprecision(3) << max-min << endl;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
	vector<double> mts;
	double in;
	while( cin >> in, in ){
		mts.push_back(in);
	}
	sort( mts.begin(), mts.end() );
	double out = mts[mts.size()-1] - mts[0];
	cout << out << endl;
	return 0;
}

C++: int main(){
  double a,tans,hans;
  cin >> a;
  tans = a;
  hans = a;
  while(cin>>a){
    if(tans>a) tans = a;
    if(hans<a) hans = a;
  }
  cout << hans - tans << endl;
}