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

int main()
{
    double h;
    vector<double> mh;
    while(cin>>h)
    {
        mh.push_back(h);
    }
    sort(mh.begin(),mh.end(),greater<double>());
    cout<<*mh.begin()-*(mh.end()-1)<<endl;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	double a;
	double maxv = 0;
	double minv = 1 << 12;
	int i = 0;
	while (cin >> a){
		maxv = max(maxv, a);
		minv = min(minv, a);
		i++;
	}
	cout << maxv - minv << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <limits>
using namespace std;
#define rep2(x,from,to) for(int x = (from); x < (to); ++(x))
#define rep(x,to) rep2(x,0,to)

int main() {
	double h;
	double highest = 0;
	double lowest = numeric_limits<double>::max();
	while(cin >> h) {
		if(highest < h) highest = h;
		if(lowest > h) lowest = h;
	}
	cout << highest - lowest << endl;
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    double height;
    double min = 1000000;
    double max = 0;
    
    while(cin >> height){
        if(height > max) max = height;
        if(height < min) min = height;
    }

    cout << max - min << endl;
}

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

int main(){
    double n;
    vector<double> v;
    while( cin >> n ){
        v.push_back( n );
    }
    double a = v[0];
    double b = v[0];
    for(int i=0 ; i < v.size() ; i++ ){
        a = max( a , v[i] );
        b = min( b , v[i] );
    }
    cout << (a-b) << endl;
}

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

int main(void)
{
  double height[100];
  double diff;
  int i = 0;

  while(cin >> height[i])
    {
      i++;
    }
  sort(height, height + i);

  diff = height[i-1] - height[0];

  cout << diff << endl;
  return 0;
}

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

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())
#define BOUND(Itr,val) lower_bound((Itr).begin(),(Itr).end(),(val))
typedef long long ll;


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

C++: #include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip> 
#include <complex> 
#include <string>
#include <vector> 
#include <list>
#include <deque> 
#include <stack> 
#include <queue> 
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm> 
#include <numeric> 
#include <typeinfo> 
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cmath>
#include <climits> 
#include <ctime> 

using namespace std;
int main(void){
	double h;
	double maxh=0.0,minh=0.0;
	scanf("%d",&h);
	maxh=h;
	minh=h;
	while(~scanf("%lf",&h)){
		maxh=max(maxh,h);
		minh=min(minh,h);
	}
	cout << maxh-minh << endl;
}

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

#define int long long int
#define main signed main()
#define bye return 0
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define each(p, v) for (auto p = (v).begin(); p != (v).end(); p++)
#define all(v) (v).begin(), (v).end()
#define prec(n) fixed << setprecision(n)
#define dump(x) cerr << "(L" << __LINE__ << ") " << #x << " = " << (x) << endl
#define clr(x, a) memset(x, a, sizeof(x))

#define sum(v) accumulate(all(v), 0)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define odd(n) ((n) % 2)
#define even(n) (!odd(n))

#define INF 1000000000
#define MOD 1000000007

#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define vi vector<int>
#define vb vector<bool>
#define vc vector<char>
     
using namespace std;

main {
  vector<double> t;
  double h;
  while(cin>>h) t.pb(h);
  sort(all(t));
  cout<<prec(32)<<t[t.size()-1]-t[0]<<endl;
  bye;
}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class t>
using table = vector<vector<t>>;
const ld eps=1e-9;

//// < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\b.answer"

bool isso(long long int a) {
	if (a == 1 || a == 0)return false;
	for (long long int i = 2; i*i <= a; ++i) {
		if ((a%i)) {
		}
		else {
			return false;
		}
	}
	return true;
}
int main() {
	
	int N;
	vector<ld>nums;
	while (cin>>N) {
		nums.emplace_back(N);
	}
	cout << *max_element(nums.begin(), nums.end()) - *min_element(nums.begin(), nums.end()) << endl;
	return 0;
}

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

int n;
double dn;
int main()
{
    char point;
    double h;
    double m=1000000000, M=0;
    while(cin >> n >> point >> dn)
    {
        h = dn/10 + n;
        M = max(M, h);
        m = min(m, h);
    }
    cout << M-m << endl;
}

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

using namespace std;

int main(void){
	double d, min_height, max_height;
	
	scanf("%lf", &d);
	max_height = min_height = d;

	while( true ){
		if( 1 != scanf("%lf", &d) ) break;

		min_height = min( min_height, d );
		max_height = max( max_height, d );
	}
	printf("%.2f\n", max_height - min_height);
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#define fi first
#define se second
using namespace std;
bool value(int y,int x,int R,int C){return 0<=y&&y<R&&0<=x&&x<C;}
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
double pie=acos(-1);
int INF=10000009;
int dx[4] = { 0,-1,0,1 };
int dy[4] = { -1,0,1,0 };
int main() {
	double x;
	double max=0,min=10000000;
	while(true){
		if (cin.eof())break; 
		cin>>x;
		if(x>max) max=x;
		if(x<min) min=x;
	}
	cout<<max-min<<endl;
}

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

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

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

int main() {
	double temp,max=0,min=9999;
	while(cin>>temp){
		if(temp>max) max=temp;
		if(min>temp) min=temp;
	} printf("%.1f",max-min);
	return 0;
}

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

int main(void) {
	float n=0;
	float min=9999999,max=0;
	while (scanf("%f",&n) != EOF)
	{
		if (max < n){max = n;}
		if (min > n){min = n;}
	}
	cout << max-min << endl;
	return 0;
}