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 <iostream>
#include <string>
#include <stdio.h>
using namespace std;
int main(void){
    double a;
    double max=0,min=999999999;
    while(~scanf("%lf",&a)){
        if(max<a)max=a;
        if(min>a)min=a;
    }
    printf("%lf\n",max-min);
}

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


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

const int INF = 1 << 25;

int main()
{
	double max_ = -1, min_ = INF;
	double r;
	while(cin >> r){
		max_ = max(max_,r);
		min_ = min(min_,r);
	}
	
	cout << max_ - min_ << endl;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;

typedef istringstream ISS;
typedef ostringstream OSS;
typedef vector <string> VS;
typedef vector <int> VI;
typedef vector <VI> VVI;
typedef vector <double> VD;
template <class T> T gcd( T a, T b ) { return !b ? a : gcd( b, a % b ); }
template <class T> T lcm( T a, T b ){ return a / gcd( a, b ) * b; }
template <class T> string print_v( vector<T> v ) { OSS oss; for ( typename vector<T>::iterator it_i = v.begin(); it_i != v.end(); ++ it_i ) { oss << *it_i << ", "; } return oss.str(); }

int main() {
    VD list;
    double height;
    while ( cin >> height ) list.push_back( height );
    cout << *max_element( list.begin(), list.end() ) - *min_element( list.begin(), list.end() ) << endl;
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    double h[50];
    
    int i;
    double x;
    for(i = 0;i < 50;i++){
        h[i] = 0;
    }
    for(i = 0; x != 0 && i < 50;i++){
        cin >> x;
        h[i] = x;
    }
    int max = 0;
    int min = 0;
    for(i = 1;i < 50;i++){
        if(h[i] != 0){
            if(h[i] > h[max]){
                max = i;
            }
            if(h[i] < h[min]){
                min = i;
            }       
        }

    }
    cout << h[max] - h[min];
}

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

using namespace std;

double abso( double n )
{
	if ( n < 0 )
	{
		return -n;
	}
	else
	{
		return n;
	}
}

int main()
{
	vector<double> height;

	double input;

	while ( cin >> input )
	{
		height.push_back( input );
	}

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

	cout << abso( *height.begin() - *height.rbegin() ) << endl;

	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  double a[11111];
  int n=0;
  double ans;
  while(cin>>a[n]){
    n++;
  }
  sort(a,a+n);
  ans=a[n-1]-a[0];
  cout<<ans<<endl;
}

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

int main()
{
    multiset<double> h;
    double height;
    while(cin >> height)
    {
        h.insert(height);
    }
    double best = *(--h.end());
    double worst = *(h.begin());

    printf("%f\n",best-worst);
    return 0;
}

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

int a[4],b[4];
int main(){
  float f;
  std::vector<float>v;
  for(;~scanf("%f",&f);)v.push_back(f);
  std::sort(v.begin(),v.end());
  printf("%.2f\n",v[v.size()-1]-v[0]);
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define INF ((1<<30)-1)
#define LINF (1LL<<60)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int, Int> P;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    double mi=INF;
    double ma=0;
    double n;
    while(cin>>n){
        mi=min(mi,n);
        ma=max(ma,n);
    }
    cout<<ma-mi<<endl;
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <string>
#include <stack>
#include <iomanip>
#include <numeric>
#include <queue>
#include <climits>
#include <complex>
#include <cmath>
#include <map>
using namespace std;
using ll = long long;
#define MOD 1000000007
#define INF 1LL << 59

int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    cout << fixed << setprecision(3);

    vector<double> v;
    double n;
    while (cin >> n)
        v.push_back(n);

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

    cout << v[v.size() - 1] - v[0] << endl;
    return 0;
}

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

int main(int argc, char *argv[]) {
	vector<float> mountain;
	float rcv;
	while (EOF != fscanf(stdin, "%f", &rcv)) {
		mountain.push_back(rcv);
	}
	sort(mountain.begin(), mountain.end());
	const int list_size = static_cast<int>(mountain.size());
	printf("%.1f\n", mountain[list_size-1]-mountain[0]);
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
int INF = 1e9+7;
#define all(c) (c).begin(), (c).end()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rep(i,b) for(auto i=0;i<(b);i++)
#define pb push_back
#define sz(c) int((c).size())

int main(int argc, char **argv)
{
  double minv, maxv, tmp;
  cin >> tmp;
  maxv = minv = tmp;
  while (cin >> tmp) {
   maxv = max(tmp, maxv);
   minv = min(tmp, minv);
  }
  cout << (maxv - minv) << endl;
  return 0;
}

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

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

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

using namespace std;

int main(){
double h[10000];
int i=0;
while(cin >> h[i]) i++;
sort(h,h+i);
cout << h[i-1] - h[0] << endl;
return 0;
}

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