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 <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<long long> vll;
typedef pair<int,int> pint;
typedef pair<long long, long long> pll;

#define MP make_pair
#define PB push_back
#define ALL(s) (s).begin(),(s).end()
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P) 
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P) 
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P) 
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; }

double d;

int main() {
    vector<double> vec;
    while (cin >> d) {
        vec.PB(d);
    }
    sort(ALL(vec));
    cout << vec[vec.size()-1] - vec[0] << endl;
    
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int (i)=0;i<(n);i++)
#define REP(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define INF LLONG_MAX - 100
#define MOD 1000000007
#define fcout cout << fixed << setprecision(15)
#define int long long
#define yorn(f) puts((f)?"Yes":"No")
#define YORN(f) puts((f)?"YES":"NO")
#define lowb lower_bound
#define upb upper_bound
typedef long long ll;
typedef pair<int, int> P;
typedef priority_queue<int> pque;
int gcd(int a,int b){return b?gcd(b,a%b):a;};
int lcm(int a,int b){return a/gcd(a,b)*b;};
int mod(int a,int b){return (a+b-1)/b;};
int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
template<typename A, size_t N, typename T>
void Fill(A(&array)[N],const T &val){std::fill((T*)array,(T*)(array+N),val);}
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;};
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;};



signed main() {
	cin.tie(0);
	cout.tie(0);
	ios::sync_with_stdio(false);

	double n;
	vector<double> a;
	while(cin >> n) a.push_back(n);
	double maxa = *max_element(all(a));
	double mina = *min_element(all(a));
	fcout << maxa - mina << endl;
	return 0;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define LOOP(i) while(i--)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	//cin.tie(0);
	//ios::sync_with_stdio(false);

	double V;
	vector<double> H;
	while(cin>>V){
		H.push_back(V);
	}
	auto res = minmax_element(ALL(H));
	
	printf("%.5lf\n",*res.second-*res.first);
	return 0;
}

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

using namespace std;

int main(){
	int i;
	float ansmax, ansmin = 100000;
	float mou[101];

	for(i = 0; i < 50; i++){

		cin >> mou[i];

		if(mou[i] == 0) break;

		ansmax = max(ansmax,mou[i]);
		ansmin = min(ansmin,mou[i]);

	}

	cout << ansmax - ansmin << endl;

	return 0;
}

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

#define rep(i, a) REP(i, 0, a)
#define REP(i, a, b) for(int i = a; i < b; ++i)

typedef long long ll;
typedef unsigned long long ull;
typedef std::pair<int, int> P;
typedef std::pair<P, int> PP;
struct edge{ int to, time, cost; };
const double esp = 1e-9;
const int infi = (int)1e+9 + 10;
const ll infll = (ll)1e+17 + 10;
const double infd = (double)1e+9;

double max = -infd, min = infd;

int main(){
	double d;
	while (std::cin >> d){
		if(d > max)max = d;
		if(d < min)min = d;
	}
	printf("%lf\n", max - min);
	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<char, int>P;

int main() {
	float Max; cin >> Max;
	float Min = Max;
	float f;
	while (cin >> f) {
		Max = max(Max, f);
		Min = min(Min, f);
	}
	cout << Max - Min << endl;
	return 0;
}

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

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

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

int main() {
  double d,ma,mi;
  cin>>d;
  ma = d,mi =d;
  while(cin>>d) {
    ma = max(ma, d);
    mi = min(mi, d);
  }
  cout<<ma-mi<<endl;
}

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

using namespace std;

//0046
int main(){
	double h;
	vector<double> height;

	while(cin >> h){
		if(cin.eof())break;
		height.push_back(h);
	}

	sort(height.begin(),height.end());
	double diff = height[height.back()] - height[height.front()];
	cout << diff << endl;

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

int main() {
    std::vector<double> v;
    double elevation;

    while (std::cin >> elevation) {
        v.push_back(elevation);
    }

    std::cout << std::fixed << std::setprecision(2)
              << *std::max_element(v.begin(), v.end())
                - *std::min_element(v.begin(), v.end())
              << std::endl;

    return 0;
}

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

using namespace std;

int main() {
  double h;
  scanf("%lf", &h);
  double a = h, i = h;
  while (scanf("%lf", &h) == 1) {
    a = max(a, h);
    i = min(i, h);
  }
  printf("%f\n", a - i);
  return 0;
}

C++: #include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdio>
#include <cmath>

using namespace std;

int main(){
	double l,h,n;
	bool flag=false;

	while(cin>>n){
		if(!flag){
			l=n;
			h=n;
			flag=true;
		}
		if(h<n)h=n;
		if(l>n)l=n;
	}
	cout<<h-l<<endl;

}