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 <stack>
#include <queue>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>

using namespace std;

int main(){

	double n;
	double max = 0, min = 20000000;
	while(cin >> n){
		if(cin.eof()) break;
		if(max < n) max = n;
		if(min > n) min = n;
	}

	printf("%0.1f\n", max - min);

	return 0;
}

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

int main(){
  double mountain;
  double min=100000.0;
  double max=0;
  while(scanf("%lf",&mountain)!=EOF){

    if(min>mountain)min=mountain;
    if(max<mountain)max=mountain;
  }
  printf("%.1f\n",max-min);

}

C++: #include <iostream>
int main(){
	double a,b=0,c=1e6;
	while (std::cin>>a)
		a>b ? b=a:a<c ? c=a:c;
	std::cout<<b-c<<std::endl;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;

typedef istringstream ISS;
typedef ostringstream OSS;
typedef vector <string> VS;
typedef vector <int> VI;
typedef vector <VI> VVI;
typedef vector <double> VD;
template <class T> T gcd( T a, T b ) { return !b ? a : gcd( b, a % b ); }
template <class T> T lcm( T a, T b ){ return a / gcd( a, b ) * b; }
template <class T> string print_v( vector<T> v ) { OSS oss; for ( typename vector<T>::iterator it_i = v.begin(); it_i != v.end(); ++ it_i ) { oss << *it_i << ", "; } return oss.str(); }

int main() {
    VD list;
    double height;
    while ( cin >> height ) list.push_back( height );
    cout << *max_element( list.begin(), list.end() ) - *min_element( list.begin(), list.end() ) << endl;
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <math.h>
using namespace std;

int main(){
	
	double x;
	
	cin>>x;
	double M=x,m=x;
	
	while(cin>>x){
		if(M<x)M=x;
		if(m>x)m=x;
	}
	
	cout<<M-m<<endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    double orz,mmin = 1e9,mmax = -1;
    while(~scanf("%lf",&orz)){
        mmax = max(mmax,orz);
        mmin = min(mmin,orz);
    }
    printf("%.1f\n",mmax-mmin);
    return 0;
}

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

using namespace std;

vector<double> mt;

int main() {
	
	double a;
	mt.clear();
	
	int b = 0;
	
	while( cin >> a)
	{
		mt.push_back(a);	
		if( cin.fail())
		break;
		b++;		
	}
	sort(mt.begin(), mt.end());
	cout << mt[b] - mt[0] << "\n";
	
	
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    double h[50];
    cout << "山の高さ" << endl;
    int i;
    double x;
    for(i = 0;i < 50;i++){
        h[i] = 0;
    }
    for(i = 0; x != 0 && i < 50;i++){
        cin >> x;
        h[i] = x;
    }
    int max = 0;
    int min = 0;
    for(i = 1;i < 50;i++){
        if(h[i] != 0){
            if(h[i] > h[max]){
                max = i;
            }
            if(h[i] < h[min]){
                min = i;
            }       
        }

    }
    cout << h[max] - h[min];
}

C++: #include <stdio.h>

int main(){
	long double n;
	long double high,low;
	long double ans;
	scanf("%lf",&n);
	high = n;
	low = n;
	while(scanf("%lf",&n) != EOF){
		if(high < n){
			high = n;
		}
		if(low > n){
			low = n;
		}
	}
	ans = high - low;
	printf("%lf\n",ans);
	return 0;
}

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

using namespace std;

int main()
{
  double n, h = 0.0, l = 999999.0;

  while (cin >> n){
    h = max(h, n);
    l = min(l, n);
  }

  printf("%.1lf\n", h - l);
}

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<cstdio>
#include<algorithm>
using namespace std;
int main(){
    double a[100000],max=-10000,min=100000000,b;
    int i=0;
    while(cin>>a[i]){
        i++;
    }
    for(int j=0;j<i;j++){
        if(a[j]>max){
            max=a[j];
        }
        if(a[j]<min){
            min=a[j];
        }
    }double ans=max-min;
    printf("%.2lf",ans);
    cout<<endl;
    return 0;
}

C++: #include<stdio.h>
#include<math.h>
int main()
{
	double h[50],r=0;
	int i=0;
	while(scanf("%lf",&h[i])!=EOF){
		i++;
	}
	i--;
	for(int j=0;j<i;j++){
		for(int k=0;k<i;k++){
			if(r<fabs(h[k]-h[j])){
				r=fabs(h[k]-h[j]);
			}
		}
	}
	printf("%2lf",r);
	return 0;
}

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 <cstdio>
#include <cmath>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <sstream>
#include <vector>
#include <string>
#include <iomanip>
#include <bitset>
#define INF	100000000
#define pb	push_back
#define fi first
#define sec second
#define SS stringstream
using namespace std;
typedef pair<int, int> P;
typedef long long int	ll;

vector<double> vec;

int main(){
	double temp;
	while(cin >> temp) vec.pb(temp);
	sort(vec.begin(), vec.end());
	cout << vec[vec.size()-1]-vec[0] << endl;
}

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

int main()
{
    double h,ans;
    vector<double> mh;
    while(cin>>h)
    {
        mh.push_back(h);
    }
    sort(mh.begin(),mh.end(),greater<double>());
    cout<<*mh.begin()-*(mh.end()-1)<<endl;
}

C++: 
#include<iostream>

#include<algorithm>

using namespace std;

int main(){

  double h[50];
  int n=0;

  while(cin>>h[n]){
    n++;
  }

  sort(h,h+n);

  cout<<h[n-1]-h[0]<<endl;

  //h[0]???????°?
  //h[n-1]????????§

  return 0;
}

C++:  #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 
 using namespace std;
 
 int main()
 {
   double h;
   double max=0;
   double min=1000000+5;
   while(cin>>h)
   {
     if(h>max) max=h;
     if(h<min) min=h;              
   }
   double range=max-min;
   printf("%.1lf\n",range);
   //while(1);
   return 0;
 }

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

using namespace std;

int main(){
	double n,a,b;
	vector<double> v;

	while(cin>>n){
		v.push_back(n);
	}

	a=v[0];
	b=v[0];

	for(int i=0;i<v.size();i++){
		a=max(a,v[i]);
		b=min(b,v[i]);
	}

	double ans=a-b;

	cout<<ans<<endl;

}

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

int main(){
	vector<double> height;
	double d;
	
	while((scanf("%lf", &d)) != EOF){
		height.push_back(d);
	}
	
	sort(height.begin(), height.end());
	
	printf("%lf\n", height.back() - height.front());
	
	return 0;
}

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

int main(){
  double n;
  vector<double> vec;
  while (cin >> n){
    vec.push_back();
  }
  sort(vec.begin(), vec.end());
  double ans = vec.back() - vec.front();
  cout << fixed << setprecision(3) << ans << endl;
}