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>
using namespace std;

int main(void)
{
  double max = 0;
  double min = 10000000000000;
  
  while (true)
  {
    double height;
    cin >> height;
    if ( cin.eof() ) break;

    if (max < height)
    {
      max = height;
    }
    if (min > height)
    {
      min = height;
    }
  }
  cout << max - min << endl;
}

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

int main(){
  double mx = -1, mn = 114514810, a;

  while(scanf("%lf", &a) != EOF){
    mx = max(mx, a);
    mn = min(mn, a);
  }

  cout << mx - mn << endl;
}

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("%.8lf\n", maxv - minv );
}

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

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

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

int a[4],b[4];
int main(){
  float f;
  std::vector<float>v;
  for(;~scanf("%f",&f);)v.push_back(f);
  std::sort(v.begin(),v.end());
  printf("%.2f\n",v[v.size()-1]-v[0]);
}

C++: #include <stdio.h>
int main() {double a,b=-99999999.9,c=99999999.9;while (scanf("%lf",&a)!=EOF) {b=(b<a)?a:b;c=(c>a)?a:c;} printf("%.2lf\n",b-c);return 0;}

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

double t;
double maxm, minm=10e9;

int main() {
  while (1) {
    if (scanf("%lf", &t) != 1) break;
    maxm = max(maxm, t);
    minm = min(minm, t);
  }
  printf("%f\n", maxm - minm);
}

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

int main(){
  double max=-1.0, min=10000.0;
  double tmp;

  while(cin>>tmp){
    if(max<tmp) max=tmp;
    if(min>tmp) min=tmp;
  }
  printf("%lf\n", max-min);

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <math.h>
#include <functional>
#include <algorithm>
#include <utility>
#include <numeric>

typedef long long Int; 
#pragma warning(disable : 4996)
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
#define REPS(a,i,n) for(int i = a ; i < n ; ++i)
using namespace std;


int main(){
	vector<double> ms;
	double a;
	while (cin >> a){
		ms.push_back(a);
	}
	sort(ms.begin(), ms.end());
	printf("%.1lf",ms[ms.size()-1]-ms[0]);
	puts("");
}

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] = {};
  for (i = 0; cin >> a[i]; i++);
  sort(a, a + 1);
  cout << a[i - 1] - a[0] << endl;
}

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

int main(void){
  double maxv = -1,minv=(int)1e5;
  double v;
  while(cin>>v){
    if(v>maxv)maxv = v;
    else if(v<minv)minv = v;
  }
  cout<<maxv-minv<<endl;
}

C++: #include<iostream>
using namespace std;
int main() {
	float syo, dai, c;
	dai = -1;
	syo = 1999999;
	while (cin >> c) {
		if (dai <= c) {
			dai = c;
		}
		if (syo >= c) {
			syo = c;
		}
	}
	cout << dai - syo << endl;
}

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[5];
  for (i = 0; cin >> a[i]; i++);
  sort(a, a + 1);
  printf("%.1f\n", a[i - 1] - a[0]);
}

C++: #include <iostream>

using namespace std;

int main(void){
	double num;
	double min;
	double max;
	cin >> num;
	min = num;
	max = num;
	while(cin >> num){
		if(num>max) max = num;
		if(num<min) min = num;
	}
	cout << max - min << endl;
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
const double INF = 1e18;

int main(){
	double h;
	double hmax=0, hmin=INF;
	while(cin >> h){
		hmax = max(hmax, h);
		hmin = min(hmin, h);
	}
	cout << fixed << setprecision(5);
	cout << hmax - hmin << endl;
	return 0;
}

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 < 8; ++i){
		fputs(tmp.c_str(), stdout);
		fflush(stdout);
	}
	
	puts("");
}

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 <algorithm>
using namespace std;

int main() {
	double min_h = 100000000, max_h = 0;

	double h;
	while (cin >> h) {
		min_h = min(min_h, h);
		max_h = max(max_h, h);
	}

	cout << max_h - min_h << 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 < 64; ++i){
		fputs(tmp.c_str(), stdout);
		fflush(stdout);
	}
	
	puts("");
}

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

int main()
{
	double a = 0, b = 1000000, t;

	while (cin >> t) {
		if (t > a)
			a = t;
		if (t < b)
			b = t;
	}

	cout << a - b << endl;

	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
     
int main(){
  double h;
  double max=0,min=1000000;
  while(cin>>h){
    if(h>max)max=h;
    if(h<min)min=h;
  }
  cout<<max-min<<endl;

  return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>
#include <climits>
#include <cfloat>


using namespace std;


int main()
{
	double ma = DBL_MIN;
	double mi = DBL_MAX;
	double al;
	while (scanf("%lf", &al) != EOF)
	{
		if (al > ma)
			ma = al;
		if (al < mi)
			mi = al;
	}

	printf("%.1f\n", ma-mi);

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<cstdio>
#include<string>
#include<cmath>
typedef long long int ll;
#define VI vector<int>

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

int n,m;

using namespace std;


int main(){
	double maxi=-1,mini=100000000;
	while(1){
		double n;
		if(!(cin>>n))break;
		if(n==0)break;
		if(maxi<n)maxi=n;
		if(mini>n)mini=n;
	}
	cout<<maxi-mini<<endl;
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    double high,max=0,min=1000000;
    for(int i=0; i<50; i++){
        cin >> high;
        if(max<high)        max=high;
        else if(high<min)   min=high;
    }
    cout << max-min << endl;
}

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

using namespace std;

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