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 <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<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;


int main(){
    double a=-1,b=-1,c;
    while(scanf("%lf",&c)!=EOF){
        if(b==-1){
            b=c;
            a=c;
        }else{
        a=max(a,c);
        b=min(b,c);
        }
    }
    printf("%.10lf\n",a-b);
    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);	
		b++;		
	}
	sort(mt.begin(), mt.end());
	cout << mt[b] - mt[0] << "\n";
	
	
	return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int main()
{
	double height;
	double max_height = 0.0, min_height = 1.0e+6;
	
	while ( cin >> height ) {
		if ( max_height < height ) max_height = height;
		if ( min_height > height ) min_height = height;
	}
	
	cout << max_height - min_height << endl;
	
	return 0;
}

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

using namespace std;

void solve()
{
	vector<double> mountain;
	double height;
	while(cin >> height)
	{
		mountain.push_back(height);
	}
	sort(mountain.begin(), mountain.end());
	cout << mountain[mountain.size() - 1] - mountain[0] << endl;
}

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

C++: #include <bits/stdc++.h>

using namespace std;

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

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

const int INF=1<<20;

int main(){
    double top=-INF,btm=INF;
    double height;

    while(cin>>height){
        top=max(top,height);
        btm=min(btm,height);
    }

    cout<<setprecision(1)<<setiosflags(ios::fixed)<<top-btm<<endl;
    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	double h, max = 0.0, min = 3776.0;
	while (cin >> h)
	{
		if (h > max) max = h;
		if (h < min) min = h;
	}

	cout << max - min << endl;

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
using namespace std;


int main(){

  double h;
  double maxh = 0;
  double minh = 1000000;
  while( cin >> h ){
    maxh = max(maxh, h);
    minh = min(minh, h);
  }
  cout << maxh - minh << endl;

  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	float n,s;
	double max;
	double min;

	max=-1;
	min=100000;

	while(scanf("%f",&n)!=EOF){
		if(n>max){
			max=n;
		}
		if(n<min){
			min=n;
		}
	}
	s=max-min;
	printf("%.1f\n",s);
	return 0;
}

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

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>
#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;
#define int long long
signed main(){
	float a;
	vector<float> d;
	while( scanf("%f", &a) != EOF ){
		d.push_back(a);
	}
	sort(d.begin(),d.end());
	cout << d[d.size()-1] - d[0] << endl;
	return 0;
}

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

int main(void)
{
	vector<double> v;
	double height;
	while(cin >> height)
	{
		v.push_back(height);
	}
	sort(v.begin(), v.end());
	cout << (v.back()-v[0]) << endl;
	return 0;
}

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

int main(void)
{
	double mt, maxi = -1, mini = 1000001;

	while (cin >> mt)
	{
		mini = min(mini, mt); maxi = max(maxi, mt);
	}
	printf("%.2f\n",maxi-mini);
	return 0;
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <sstream>
#include <cmath>
#include <climits>
#include <set>
#include <map>

using namespace std;

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

typedef vector<int> vi;

int main()
{
	double highest = -1.0, lowest = -1.0;
	double h;
	while(scanf("%lf", &h) != EOF){
		if(highest == -1.0 || highest < h)
			highest = h;
		if(lowest == -1.0 || h < lowest)
			lowest = h;
	}

	printf("%f\n", highest-lowest);

	return 0;
}

C++: #include <stdio.h>

int main(void) {
  double a, min = 1000000.0, max = 0.0;
  while(scanf("%lf", &a) != EOF) {
    if(min > a) min = a;
    if(max < a) max = a;
  }
  printf("%f\n", max - min);
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
vector<long double> v; long double x;
int main() {
	while(cin >> x) v.push_back(x);
	sort(v.begin(), v.end());
	cout << v.back() - v.front() << endl;
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(void){
    double n;
    std::deque<double> deq;
    while (cin>>n) {
        deq.emplace_back(n);
    }
    sort(deq.begin(),deq.end());
    cout << deq.back()-deq.front() << endl;
}

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

int main(){
	const string tmp(999998, '0');

	istream_iterator<double> first(cin), last;
	vector<double> v(first, last);
	printf("%f", *max_element(v.begin(), v.end()) - *min_element(v.begin(), v.end()));
	
	for(int i = 0; i < 10; ++i){
		fputs(tmp.c_str(), stdout);
		fflush(stdout);
	}
	
	puts("");
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
	double h;
	vector<double> high;
	while(cin>>h){
		high.push_back(h);
	}
	sort(high.begin(),high.end());
	cout<<high[high.size()-1]-high[0]<<endl;
	return 0;
}

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

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){	
	double amax, amin, tmp;
	cin >> tmp;
	amax = tmp;
	amin = tmp;
	while (cin >> tmp){
		amin = min(tmp, amin);
		amax = max(tmp, amax);
	}
	cout << amax - amin << endl;
}