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<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000.0
#define MOD 1000000009
#define EPS 1E-9

double x;
double mn =  INF;
double mx = -INF;

int main()
{
  while(cin >> x){
    maxup(mx, x);
    minup(mn, x);
  }

  printf("%.10f\n", mx - mn);

  return 0;
}

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

int main(){
	double num,maximum=0,minimum=DBL_MIN,cnt=0;
	while(cin>>num){
		maximum=max(maximum,num);
		if(cnt==0){
			minimum=num;
		}else{
			minimum=min(minimum,num);
		}
		cnt++;
	}
	cout<<maximum-minimum<<endl;
	return 0;
}

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

int main(){
	float max = 0, min = 1000000, in;
	while (true)
	{
		cin >> in;
		if (cin.eof()) { break; }
		if(max<in){
			max = in;
		}
		else if (min > in){
			min = in;
		}
	}
	cout << max - min << endl;

	return 0;
}

C++: #include<iostream.h>
int main(){double l,m,n=1e5;for(;cin>>l;m<l?m=l:l,n>l?n=l:l);cout<<m-n<<endl;}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){

  vector<double>in;
  double a;
  int count=0;
  while(cin >> a!='\0'){
    in.push_back(a);
    count++;
  }
  //cout << in[0] << endl;

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

  //cout << count << endl;

  cout << in[count-1]-in[0]<< endl;

}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main(){
    float ma,mi,ins;
    scanf("%f",&ins);
    ma=mi=ins;
    while(~scanf("%f",&ins)){
        ma=max(ma,ins);
        mi=min(mi,ins);
    }
    printf("%f\n",ma-mi);
}

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

int main(){
	float max = 0, min = 1000000, in;
	while (true)
	{
		cin >> in;
		if(max<in){
			max = in;
		}
		else if (min > in){
			min = in;
		}
		cout << max - min << endl;
	}
	return 0;
}

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

int main(){
  double pre, now, max=0.0;
  cin>>pre;
  while(cin>>now){
    if(max<abs(pre-now))max=abs(pre-now);
  }
  cout<<max<<endl;
  return 0;
}

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

using namespace std;

int main(){
    double x;
    cin >> x;
    double minimum = x, maximum = x;
    while(cin >> x){
	minimum = min(minimum, x);
	maximum = max(maximum, x);
    }
    cout << maximum - maximum << endl;
    return 0;
}

C++: #include<iostream>
#include<set>
#include<cstdio>
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());

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

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
    double a = 1e100, b = -1e100, t;
    while (scanf("%lf", &t) != EOF) a = min(a, t), b = max(b, t);
    printf("%.6f\n", b-a);
    return 0;
}

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"

int main() {
	
	ld N;
	vector<ld>nums;
	while (cin>>N) {
		nums.emplace_back(N);
	}
	cout <<setprecision(22)<<fixed<< *max_element(nums.begin(), nums.end()) - *min_element(nums.begin(), nums.end()) << endl;
	return 0;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int main()
{
	double mx=-1,mn=100000;
	double a;
	while(scanf("%lf",&a)!=EOF)
	{
		mx=max(mx,a);
		mn=min(mn,a);
	}
	printf("%.5lf\n",mx-mn);
  return 0;
}

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

using namespace std;

int main(){
	float a;
	vector<float> m;
	while(cin >> a)
	{
		m.push_back(a);
	}
	cout << *max_element(m.begin(),m.end()) - *min_element(m.begin(),m.end())<< endl;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <string>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,P> pip;
typedef long long ll;
const int inf=(1<<31)-1;
const double pi=acos(-1);

double a,M=-1,m=-1;

int main(){
	while(cin>>a){
		M=max(M,a);
		m=min(m,a);
	}
	cout<<M-m<<endl;
}

C++: #include <stdio.h>
#include <math.h>
#include <algorithm>
 
using namespace std;
 
int main(){
    double max = -1,min = 1000001,tmp;
 
    while(scanf("%lf",&tmp)!=EOF){
        max = (max >= tmp)?max:tmp;
        min = (min <= tmp)?min:tmp;
    }
 
    printf("%.1lf\n",max-min);
 
    return 0;
}

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

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


	return 0;
}

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

using namespace std;

int main() {
    double h;
    double maxval = 0, minval = 1e30;
    while(cin >> h) {
        maxval = max(h, maxval);
        minval = min(h, minval);
    }
    cout << maxval-minval << endl;
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <map>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

int main() {
    double highest = -1e9;
    double lowest = 1e9;
    double h;
    while(cin >> h) {
        highest = max(highest, h);
        lowest = min(lowest, h);
    }
    printf("%.3f\n", highest- lowest);
    return 0;
}

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

using namespace std;

int main()
{
    double max_m, min_m, tmp;

    max_m = numeric_limits<double>::min();
    min_m = numeric_limits<double>::max();
    while (cin >> tmp) {
        max_m = max(max_m, tmp);
        min_m = min(min_m, tmp);
    }
    cout << max_m - min_m << endl;

    return 0;
}

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

using namespace std;


int main() {
	
	double a;
	double maxt = 0;
	double mint = 99999999;
	
	while( cin >> a)
	{
			maxt = max(maxt, a);
			mint = min(mint, a);	
	}

	cout << fixed << setprecision(6) << maxt - mint << "\n";
	
	
	return 0;
}