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<algorithm>
#include<stdio.h>
using namespace std;

int main(){
	float big = 0, small = 100000;
	float input[1000];
	int i=0;

	while(scanf("%f", &input[i]) != EOF){
		big = max(big, input[i]);
		small = min(small, input[i]);
		i++;
	}
	cout << big - small << endl;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
int main(){
    double a,mi=1000000,ma=0;
    while(cin>>a){
        mi=min(mi,a);
        ma=max(ma,a);
    }
    cout<<ma-mi<<endl;
    return 0;
}

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

float a;
float min = 1000000;
float max = 0;

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

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 = INT_MIN;
    double lowest = INT_MAX;
    double h;
    while(cin >> h) {
        highest = max(highest, h);
        lowest = min(lowest, h);
    }
    printf("%.3f\n", highest- lowest);
    return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	double mx,mn,mou;
	cin>>mou;
	mx=mou;mn=mou;
	for(;cin>>mou;){
		if(mx<mou)mx=mou;
		if(mn>mou)mn=mou;
	}
	cout<<mx-mn<<endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
    double h,high=0,low=0;
    while(scanf("%lf",&h)!=EOF){
        if(low==0) low=h;
        if(high<h) high=h;
        if(low>h) low=h;
    }
    printf("%lf\n",high-low);
    return 0;
}

C++: #include <iostream>

using namespace std;
int main(void){
    // Here your code !
float n,a=0,b=0;
cin>>n;
a=n;
b=n;
while(cin>>n){
cin>>n;
if(n>=a) a=n;
else if(n<b) b=n;
}
printf("%.1f\n",a-b);
return 0;
}

C++: #include<iostream>
main(){double l,m,n=1e5;for(;std::cin>>l;m<l?m=l:l)n>l?n=l:l;std::cout<<m-n<<"\n";}

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("%.2f\n",best-worst);
    return 0;
}

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(){
	float a,b=0,c=1e6;
	while (cin>>a)
		if (a>b) b=a;
		else if (a<c) c=a;
	cout<<b-c<<endl;
}

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 = INT_MIN;
    double lowest = INT_MAX;
    double h;
    while(cin >> h) {
        highest = max(highest, h);
        lowest = min(lowest, h);
    }
    printf("%.3f\n", highest- lowest);
    return 0;
}

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

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

int main()
{
  int i;
  double a[10000] = {0};
  for (i = 0; cin >> a[i]; i++);
  sort(a, a + 1);
  cout << a[i - 1] - a[0] << endl;
}

C++: #include <iostream>
#include <algorithm>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdio>
#include <cFloat>

using namespace std;

int main() {
	double height = 0, maxNum=0.0, minNum=DBL_MAX;
	while(cin>>height){
		if(cin.eof()) break;
		maxNum = max(maxNum, height);
		minNum = min(minNum, height);
	}
	printf("%.1f\n", maxNum-minNum);
	return 0;

}

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

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

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

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

int main(){
  double a,b;
  double t;
  while(cin >> t){
    a = max(a,t);
    b = min(b,t);
  }
  cout << a-b << endl;
  return 0;
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
#include<map>
#include<cmath>
#include<complex>
using namespace std;

typedef complex<double> P;

#define X real()
#define Y imag()
typedef int kz;

kz gcd(kz a,kz b) { if(b==0) return a; else gcd(b,a%b); }

int main(){
    vector<double> n(1);
    int tmp=0;
    double s;
    while (scanf("%lf",&s)!=EOF){
        n.push_back(s);
        tmp++;
    }
    sort(n.begin(),n.end());
    printf("%lf\n",n[tmp]-n[1]);
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  double d[1000]={0},max=0,min=100000;
  for(int i=0;cin>>d[i];i++){
    if(max<d[i])max=d[i];
    if(min>d[i])min=d[i];
  }
  cout<<max-min<<endl;
  return 0;
}