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

using namespace std;



void Solution()
{
    int n = 0;
    double a[n];
    
    while (cin>>a[n])
    {
        n++;
    }
    
//    for (int i = 0; i < n - 1; i++)
//    {
//        for (int j = i + 1; j < n; j++)
//        {
//            if (a[i] < a[j])
//            {
//                double temp = a[i];          //swap
//                a[i] = a[j];
//                a[j] = temp;
//            }
//        }
//    }
    
    sort(a, a + n); //sorting as ascedning sequence
    
    cout.setf(ios::fixed); //"setf" is used for “half-adjusting”
    cout.precision(2);
    
//    cout<<a[0] - a[n - 1]<<endl;
    cout<<a[n - 1] - a[0]<<endl;
    
}

int main()
{
    Solution();
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void)
{
	double h[10000];
	int ptr=0;
	while(cin >> h[ptr]){
		ptr++;
	}
	double max=h[0];
	double min=h[0];
	for(int i=1; i<ptr; i++){
		if(h[i]>max) max = h[i];
		if(h[i]<min) min = h[i];
	}
	cout << max-min<< endl;
	return 0;
}

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

using namespace std;

int main()
{
	double m;
	double max, min;
	max = 0.0;
	min = 100000.0;
	int i = 0;
	while (cin >> m){
		if (max < m){
			max = m;
		}
		else if (min > m){
			min = m;
		}
	}
	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] - high[0] << endl;


	return 0;
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <math.h>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

const long double EPS = 1e-12;
const long double INF = 1e18;




int main(){
	long double h,ma=0.0,mi=INF;
	while(cin>>h){
		ma=max(ma,h);
		mi=min(mi,h);
	}
	cout<<fixed<<setprecision(3)<<ma-mi<<endl;
	return 0;
}
/*

*/

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<numeric>
#include<cstring>
#include<cstdio>
#include<functional>
#include<bitset>
#include<limits.h>
#include<cassert>
#include<iterator>
#include<complex>
#include<stack>
#include<sstream>
#include<iterator>
#include<list>

using namespace std;

typedef  long long int lint;

#define rep(i, n) for (lint i = 0; i < n; i++)
#define sort(v) sort((v).begin(), (v).end())
#define reverse(v) reverse((v).begin(), (v).end())
#define upper(v,hoge) upper_bound(v.begin(),v.end(),hoge)
#define lower(v,hoge) lower_bound(v.begin(),v.end(),hoge)
#define llower(v,hoge) *lower_bound(v.begin(), v.end(), hoge)
#define lupper(v,hoge) *upper_bound(v.begin(), v.end(), hoge)
#define mp make_pair
#define IP pair<int,int>
#define enld endl

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

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

using namespace std;

int main() {
  double heights[50];

  int i = 0;
  while(cin >> heights[i]) {
    i++;
  }

  double min_f = *min_element(heights, heights + i);
  double max_f = *max_element(heights, heights + i);

  printf("%.6lf\n", max_f - min_f);

  return 0;
}

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

int main()
{
	double MIN=(double) (1<<30), MAX=0, t;
	while (cin >> t)
	{
		MIN = min(MIN, t);
		MAX = max(MAX, t);
	}

	cout.setf(ios::fixed);
	cout.precision(3);
	cout << MAX-MIN << endl;
}

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

using db = double;
using ll = long long;
using vi = vector <int>;
#define op operator
#define pb push_back

int main() {
	ios :: sync_with_stdio(0);

	db x; vector <db> v;
	while(cin >> x) v.pb(x);
	cout << fixed << setprecision(3);
	cout << *max_element(v.begin(), v.end()) - *min_element(v.begin(), v.end());

	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	float a,s,d,f,g,i,j;
	s=0;
	d=100000000;
	while(scanf("%f",&a)!=EOF){
		if(a>s){
			s=a;
		}
		if(a<d){
			d=a;
		}
	}
	printf("%f\n",s-d);
	return 0;
}

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

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

C++: #include <cstdio>

int main() {
    double h[100] = { 0 };
    int co = 0;

    while (scanf("%lf", &h[co]) != EOF) {co++;}

    double mi = h[0];
    double mx = 0.0f;

    for (int i = 0; i < co; ++i) {
        if (h[i] < mi) {
            mi = h[i];
        }

        if (mx < h[i]) {
            mx = h[i];
        }
    }

    printf("%lf\n", mx - mi);

    return 0;
}

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

#define rep(i,n) for(int i = 0;i < n; i++)

int main() {
	double input;
	vector<double> height;
	while (cin >> input) height.push_back(input);

	rep(i, height.size()) {
		rep(j, height.size() - i) {
			if (height[i + j] > height[i])swap(height[i + j], height[i]);
		}
	}
	cout << height[0] - height.back() << endl;
	return 0;
}

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

int main(){
  float min=0;
  float max=0;
  float height=0;

  while(cin >> height){
    if(height==0){
      break;
    }

    if(min == 0){
      min = height;
    }
    else if(min > height){
      min = height;
    }

    if(max < height){
      max = height;
    }

  }

  cout << max-min << endl;

  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
double in,maxm,mini;
int main(){
	cin>>maxm;
	mini=maxm;
	while(cin>>in){
		maxm=max(maxm,in);
		mini=min(mini,in);
	}
	printf("%.6f\n",maxm-mini);
	return 0;
}