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 <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 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;
}

C++: #include<iostream>
using namespace std;
main(){
  double h,l,d;

  cin>>h;
  cin>>d;
  if(d>h){l=h;h=d;}
  else l=d;
  while (cin >> d){
    if(d>h)h=d;
    else if(d<l)l=d;
  }
  cout << h-l << endl;
}

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

int main(void) {
    double _max, _min;
    double input;
    cin >> input;
    _max = input, _min = input;
    while(cin >> input) {
        _max = max(_max, input); _min = min(_min, input);
    }
    cout << _max - _min << endl;
    return(0);
}

C++: #include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
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)
#define PREP(it,array) for(vector<P>::iterator it=array.begin(); it!=array.end(); ++it)
#define SREP(it,array) for(vector<string>::iterator it=array.begin(); it!=array.end(); ++it)

#define MP       make_pair
#define PB       push_back
#define ALL(x)   (x).begin(),(x).end()

const int INF = 1<<29;
const double EPS = 1e-9;
double zero(double d){
  return d < EPS ? 0.0 : d;
}

typedef long long LL;
typedef pair<int,int> P;


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

  double mm, mx;

  double tmp;
  while(cin>>tmp){
    mm = min(mm,tmp);
    mx = max(mx,tmp);
  }

  cout << mx - mm << endl;


  return 0;
}

C++: #include <cstdio>
#include <cmath>
using namespace std;
double m,h,l;
int main()
{
    while(~scanf("%lf",&m) {
        h=max(m,h);
        l=min(m,l);
    }
    printf("%f\n",fabs(h-l));
    return 0;
}

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

main(){
  double minv = FLT_MAX;
  double maxv = FLT_MIN;

  double x;
  while( cin >> x ){
    minv = min(minv, x );
    maxv = max(maxv, x );
  }

  printf("%.1lf\n", maxv - minv );
}

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

int main() {
	int c = 0;
	double m[100000];
	while(scanf("%lf", &m[c]) != EOF){
		c++;
	}
	sort(m, m + c);
	cout << fixed << m[c - 1] - m[0] << endl;
	return 0;
}

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

using namespace std;

int main(void)
{
    ios::sync_with_stdio(false);
    double max = 114514810, min = -1;
    double h;
    while(cin >> h) {
        max = max(max, h);
        min = min(min, h);
    } 
    cout << max - min << endl;

    return 0;
}

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
using namespace std;

int main() {
	double low = 1000000, high = 0;
	int n;
	while (cin >> n) {
		if (n < low) {
			low = n;
		}
		if (high < n) {
			high = n;
		}
	}
	cout << high - low << endl;
}

C++: #include <iostream>

using namespace std;

int main(void){
	double a, mx, mn;
	cin >> a;
	mx = mn = a;
	while(1){
		if(cin.eof()){
			break;
		}
		cin >> a;
		mx = max(mx,a);
		mn = min(mn,a);
	}
	cout << mx - mn << endl;
	return 0;
}

C++: #include <iostream>
#include <limits>
using namespace std;
int main() {
  double e, min = numeric_limits<double>::max(), max = 0;
  while (cin >> e) {
    if (e < min) min = e;
    if (e > max) max = e;
  }
  cout << max - min << endl;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
	double a[52];int c=0;
	while(cin>>a[c++]);
	sort(a,a+c-1);
	cout<<a[c-2]-a[0]<<endl;
}

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

int main(){
	vector<float> v;
	float input;
	while(cin >> input){
		v.push_back(input);
		sort(v.begin(), v.end());
		float ans;
		vector<float>::iterator ite;
		ite = v.end();
		ans = *(ite-1) - v.at(0);
		printf("%.1f\n", ans);
	}

	return 0;
}

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

int main(){
  int k=0;
  double a,high[10];
  while(cin>>high[k])
    k++;

  for(int j=0;j<k;j++)
    for(int i=0;i<k;i++)
      if(high[i]<high[i+1])
	swap(high[i],high[i+1]);

  for(int i=0;i<k;i++)
    a=high[0]-high[k-1];

    cout<<a<<endl;

  return 0;
}

C++: import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String args[]) {
		ArrayList<Double> al = new ArrayList<Double>();
		while(sc.hasNext()) {
			al.add(sc.nextDouble());
		}
		System.out.println(Collections.max(al) - Collections.min(al));
	}
}

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<cstdio>
#include<iostream>

using namespace std;

int main()
{
	double max,min;
	double hei;
	int flag=1;

	max=0;
	while(scanf("%lf",&hei)!=EOF){
		if(flag){
			min=hei;
			flag=0;}
		if(max<hei)
			max=hei;
		else if(min>hei)
			min=hei;
	}
	printf("%.1lf\n",max-min);
	return 0;
}

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

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