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 <cstdlib>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
    double height;
    vector<double> data;
    while(cin >> height)
    {
        data.push_back(height);
    }
    cout <<
        max_element(data.begin(),data.end())
        -
        min_element(data.begin(),data.end())
        << endl;

    return EXIT_SUCCESS;
}

C++: #include <iostream>
#include <vector>
int main()
{
	double 			input;
	std::vector<double> 	height;
	while (std::cin >> input) {
		height.push_back(input);
	}
	sort(height.begin(), height.end());
	std::cout << *(height.end()-1) - *(height.begin()) << std::endl;
}

C++: #include <iostream>

using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	float max = -1000000000.0f;
	float min = 1000000000.0f;

	float height;

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

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(){

  int i=0;
  double a[100000],max,min;

  while(scanf("%lf",&a[i]) != EOF ){
    i++;
  }
  
  max=a[0];
  min=a[0];

  for(int j=0 ; j < i ; j++){
    
    if( max < a[j] ){
      max=a[j];
    }
    if( min > a[j] ){
      min=a[j];
    }

  }

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

  return 0;

}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){

  double h;
  double max=0,min=10000000;

  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 <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    double x, l = 1e10, r = -1;
    while(cin >> x){
        l = min(x, l); r = max(x, r);
    }
    printf("%.10lf\n", r-l);
    return 0;
}

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main(){
	double h, min = 1000000.0, max = 0.0;
	while(cin >> h){
		if( h > max ) max = h;
		else if( h < min ) min = h;
	}
	cout << fixed << setprecision(1) << max - min << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <utility>

#define ll (long long)
#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)


using namespace std;

int main (void){
  
    vector <double> h(500,0);
    int i = 0,j = 0,k = 0,l = 0;
    double max = 0;
    double min = 0;
    while(cin >> h[i++]);
    sort(h.begin(),h.end(),greater<double>());
    //cout << h[i-2] << endl;
    printf("%.1f\n",h[0]-h[i-2]);
    return 0;
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

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

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

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

  while(cin >> n) m.PB(n);

  vector<double>::iterator max_it = max_element(m.begin(), m.end());
  vector<double>::iterator min_it = min_element(m.begin(), m.end());

  printf("%.1lf\n", (*max_it)-(*min_it));
}

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

int main()
{
	double a,Max,Min;
	bool flag  = true;
	while(cin >> a)
	{
		if(flag)
		{
			Max = a;
			Min = a;
			flag = false;
		}
		else
		{
			Max = max(Max,a);
			Min = min(Min,a);
		}
	}

	cout << Max - Min << endl;
	return 0;
}

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

int main() {
	double a=0.0, b=0.0, minsum=2000000.0, sum=-1000.0;
	double cnt = 0.0;
	while(scanf("%lf",&a)!= EOF){
	 sum=max(sum,a);
	 minsum=min(minsum,a);
	 }
	printf("%.5f", sum-minsum);
}

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

#define REP(i,a,n) for(int i=(a);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define EPS 1e-8

int main(){
	vector<double> v;
	double d;
	while(~scanf("%lf",&d))v.push_back(d);
	sort(all(v));
	printf("%lf\n",v[v.size()-1]-v[0]);
	return 0;
}

C++: //01
#include<iostream>
#include<algorithm>

using namespace std;

int main(){
  double h=-1,l=1<<30;
  for(double n;cin>>n;){
    h=max(h,n);
    l=min(l,n);
  }
  cout<<h-l<<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; 
        count++;     
    }
    cout << max - min << endl; 
}

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main(){
	double h, min = 0.0, max = 0.0;
	while(cin >> h){
		if( h > max ) max = h;
		else if( h < min ) min = h;
	}
	cout << fixed << setprecision(1) << max - min << endl;
}

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

int main()
{
	double hei;
	double max_, min_;
	bool flag = false;
	
	while (scanf("%lf", &hei) != EOF){
		if (flag == false){
			max_ = hei;
			min_ = hei;
			flag = true;
		}
		if (hei > max_){
			max_ = hei;
		}
		else if (hei < min_){
			min_ = hei;
		}
	}
	
	printf("%.1lf\n", max_ - min_);
	
	return (0);
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main(){
	float mon,low=1000000,high=0;
	while(cin>>mon){
		if(low>mon)low=mon;
		if(high<mon)high=mon;
	}
	cout<<high<<" "<<low<<" "<<high-low<<endl;
	return 0;
}