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++: #define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <queue>
#include <climits>
#include <map>
#include <stack>
using namespace std;
#define M_PI 3.141592
#define toRad 2.0*M_PI/360.0
#define inin(x) int x;cin>>x;
#define all(x) x.begin(),x.end()
#define debug(x) cout<<#x<<" "<<x<<endl;
#define rep(i,n) for(int i=0;i<(int)n;i++)
typedef pair<int, int> pii;

int main()
{
	double mi, ma, x;
	ma = DBL_MIN; mi = DBL_MAX;
	while (cin >> x)
	{
		ma = max(ma, x);
		mi = min(mi, x);
	}
	printf("%lf\n", ma - mi);
}

C++: #include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
const ll MOD=1000000007;
const ll INF=1000000010;
const ll LINF=4000000000000000010LL;
const int MAX=310;
const double EPS=1e-9;
int dx[4]={0,0,1,-1};
int dy[4]={-1,1,0,0};
int main(){
	double mi=10000000;
	double ma=0;
	double h;
	while(cin>>h){
		mi=min(mi,h);
		ma=max(ma,h);
	}
	cout<<ma-mi<<endl;
}

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

int main(){
	const string tmp(1048576, '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 < 16; ++i){
		fputs(tmp.c_str(), stdout);
		fflush(stdout);
	}
	
	puts("");
}

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

using namespace std;

int main() {

	double v;
	double max_v = -1, min_v = numeric_limits<int>::max();
	while (cin >> v) {
		max_v = max(max_v, v);
		min_v = min(min_v, v);
	}

	cout << (max_v - min_v) << endl;

	return 0;
}

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

int main(){
	for(int i = 0; i < 9999999; ++i){
		putchar('0');
	}

	puts("");
}

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

int main(){
  double mountain[1111],ans;
  int i=0;
  while(cin >> mountain[i]){
    i++;
  }
  sort(mountain,mountain+i);
  ans = mountain[i-1] - mountain[0];
  cout << ans << endl;
}

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

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin(), a.end()

int main() {
  double mx = -1.0;
  double mn = 1000001.0;
  double n;
  while (cin >> n) {
    mx = max(mx, n);
    mn = min(mn, n);
  }
  cout << mx - mn << endl;
  return 0;
}

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

int main()
{
	double height = 0,low = 0;
	double input;
	vector<double> height_array;
	do
	{
		cin >> input;
		height_array.push_back(input);
	} while (1);
	for (int i = 0;i < height_array.size();i++)
	{
		double temp;
		if (height < height_array[i]) {
			temp = height_array[i];
			height_array[i] = height;
			height = temp;
		}
		if (low > height_array[i])
		{
			low = height_array[i];
		}
	}
	cout << height - low << endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
    double a[1000];
    int i=0;
    while(cin>>a[i])i++;
    sort(a,a+i);
    reverse(a,a+i);
    cout<<a[0]-a[i-1]<<endl;
    //for(int j=0;j<100;j++)
    //{
    //    cout<<"a["<<j<<"]="<<a[j]<<endl;
    //}
    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
        double max = 0, min = 0;
        double tmp;

        while ( cin >> tmp )
        {
                if ( min == 0 )
                {
                        min = tmp;
                        max = tmp;
                }
                else if ( tmp > max )
                {
                        max = tmp;
                }
                else if ( tmp < min )
                {
                        min = tmp;
                }
        }

        cout << max - min << endl;

        return 0;
}

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<vector>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
  vector<double> high;
  double d;
  while(cin >>d) high.push_back(d);
  sort(high.begin(),high.end());
  printf("%.1lf\n",high[high.size()-1]-high[0]);
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <math.h>
#include <map>
#include <vector>

//#define PI 3.141592653589

using namespace std;

vector<double> heights;

int main()
{
	double height;
	double hyoukousa;
	int num = 0;
	
	while (cin >> height)
	{
		heights.push_back(height);
		num++;
	}
	sort(heights.begin(), heights.end());
	hyoukousa = heights[num-1] - heights[0];
	/*
	for (int i=0; i<num; i++)
	{
		cout << heights[i] << endl;
	}
	*/
	cout << hyoukousa << endl;
	
	return 0;
}

C++: #include <iostream>
#include <cstdio>
int main(){
	double i=1e+64,a=0,t;
	while(std::cin>>t){
		if(t<i)i=t;
		if(t>a)a=t;
	}
	printf("%f\n", a-i);
}

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

int main()
{
    double height;
    double ans;
    vector<double> data;
    vector<double>::iterator itMax, itMin;
    while(cin >> height)
    {
        data.push_back(height);
    }
    cout << setprecision(3) << fixed;
    ans = *(max_element(data.begin(),data.end()))
        - *(min_element(data.begin(),data.end()));
    cout << ans << endl;

    return EXIT_SUCCESS;
}

C++: #include<stdio.h>

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

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

int main()
{
    double height;
    double maxUp,maxLow;
    cin>>maxUp;
    maxLow=maxUp;
    while(cin>>height,!cin.eof()){
        if(height>maxUp){
            maxUp=height;
        }
        else if(height<maxLow){
            maxLow=height;
        }
    }
    cout<<maxUp-maxLow<<endl;
    return 0;
}

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

int main(){
	vector<double> h;
	double n;

	while( scanf("%lf", &n) != EOF ){
		h.push_back(n);
	}
	sort( h.begin() , h.end() );
	int i = h.size()-1;
	printf("%.1f\n", h[i]-h[0]);
	return 0;
}

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

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

main(){
  double minv = FLT_MAX;
  double maxv = FLT_MIN;

  double x;
  while( cin >> x ){
    minv = min(minv, x );
    maxv = max(maxv, x );
  }

  printf("%.lf\n", maxv - minv );
}

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

main() {
  double a, mina, maxa;
  mina = 99999999;
  maxa = -99999999;
  while(cin >> a) {
    mina = min(mina, a);
    maxa = max(maxa, a);
  }
  cout << maxa - mina << endl;
}