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>

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif

int main(int argc, char **argv){
	double h;
	double min_h = 1000001;
	double max_h = 0;

#if INPUT_FROM_FILE
	//std::ifstream ifs("test.txt");
	FILE *fp = fopen("test.txt", "r");
#endif

	
#if INPUT_FROM_FILE
	while(fscanf(fp, "%lf", &h) != EOF){
#else
	while(scanf("%lf", &h) != EOF){
#endif
		min_h = std::min(min_h, h);
		max_h = std::max(max_h, h);
	}
	double dif = int((max_h - min_h) * 100 + 0.5) / 100.0;
	std::cout << dif << std::endl;
	return 0;
}

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

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
#define int ll

signed main(void)
{
  double a, b[100], ma = -INF, mi = INF;
  int cnt = 0;
  while(cin >> a) {
    b[cnt] = a;
    cnt++;
    //cout << ma-mi << endl;
  }
  REP(i, cnt) {
    //cout << i << " ";
    ma = max(ma, b[i]);
    mi = min(mi, b[i]);
  }
  cout << fixed << setprecision(5) << ma-mi << endl;
  return 0;
}

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

int main()
{
	double height,low;
	double input;
	vector<double> height_array;
	while (cin >> input) {
		height_array.push_back(input);
	}
	low = height = height_array[0];
	for (int i = 0;i < height_array.size();i++)
	{
		double temp;
		if (low >= height_array[i])
		{
			low = height_array[i];
		}
		if (height <= height_array[i]) {
			height = height_array[i];
		}

	}
	cout << height - low << endl;
	return 0;
}