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 ()
{
    double MAX, MIN;
    double n;
    cin >> n;
    MAX = MIN = n;
    while (cin >> n) {
        if (MAX < n) {
            MAX = n;
        } else if (MIN > n) {
            MIN = n;
        }
    }
    cout << (MAX - MIN) << 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++: #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 = -1; mi = 99999999999999999;
	while (cin >> x)
	{
		ma = max(ma, x);
		mi = min(mi, x);
	}
	printf("%lf\n", ma - mi);
}

C++: #include<iostream>
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 <vector>
#include <algorithm>

using namespace std;

//0046
int main(){
	double h;
	vector<double> height;

	while(cin >> h){

		height.push_back(h);
	}

	sort(height.begin(),height.end());
	double diff = height.back() - height.front();
	cout << diff << endl;
}

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

using namespace std;

int main(void) {
	double min = 0.0, max = 0.0, dif, height;
	int count = 0;
	while( scanf("%lf", &height) != EOF ) {
		
		if(count == 0) {
			max = height;
			min = height;
		} else {
			if(height > max) {
				max = height;
			}
			if(height < min) {
				min = height;
			}
		}
		dif = max - min;
		count++;
	}
	cout << dif << endl;
	
	return 0;
}

C++: #include <cstdio>
#include <algorithm>
#include <vector>
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<iostream>
using namespace std;

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

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

int main(){
	
	double max=-1,min=-1,n;
	
	while(scanf("%lf",&n)!=EOF){
		if(n>max||max==-1){
			max=n;
		}
		if(n<min||min==-1){
			min=n;
		}
	}
	
	cout<<max-min<<endl;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
	double a;
	double u=0,d=10000000;
	while(cin>>a){
        u=max(u,a);
        d=min(d,a);


	}
	u-=d;
	printf("%.1lf\n",u);


	return 0;
}

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

using namespace std;

int main(){
    double x;
    cin >> x;
    double minimum = x, maximum = x;
    while(cin >> x){
	minimum = min(minimum, x);
	maximum = max(maximum, x);
    }
    cout << maximum - minimum << endl;
    return 0;
}

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

using namespace std;

vector<double> M;
double h;

int main(){
  
  while(1){
    cin >>h;
    M.push_back(h);
    sort(M.begin(),M.end());
    if(cin.eof()){break;}
  }
      printf("%.1f\n",M[M.size()-1]-M[0]);
  return 0;
}

C++: main(){
	double max=0,min=1e9,h;
	while(~scanf("%lf",&h)){
		if(max<h)	max=h;
		if(min>h)	min=h;
	}
	printf("%f\n",max-min);
	exit(0);
}

C++: #include<iostream>
using namespace std;
#include<cstdio>
#include<limits.h>
#include<vector>
#include<cfloat>
int main(){
  double mountain;
  double min=DBL_MAX;
  double max=-DBL_MAX;
  cout<<max<<" "<<min<<endl;
  while(scanf("%lf",&mountain)!=EOF){

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

}

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

using namespace std;

int main(){
    double x;
    cin >> x;
    double minimum = x, maximum = x;
    while(cin >> x){
	minimum = min(minimum, x);
	maximum = max(maximum, x);
    }
    cout << maximum - maximum << endl;
    return 0;
}

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

const double INF = 1e10;

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

	double min_h = INF, max_h = -INF;
	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 <iostream>
#include <algorithm>
using namespace std;

int main() {
  double mini, maxi, h;
  mini = maxi = -1.0;
  while(cin >> h) {
    if(mini == -1.0) {
      mini = maxi = h;
    } else {
      mini = min(mini, h);
      maxi = max(maxi, h);
    }
  }
  cout << maxi - mini << endl;
  return 0;
}

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

  double a;
  double ma,mi;
  cin >> a;
  ma = a;
  mi = a;
  while(cin >> a){
    if(a < mi) mi = a;
    else if(a > ma) ma = a;
  }
  printf("%.3lf\n",ma-mi);
  return (0);
}

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

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <memory.h>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


int main() {
	vector<double> a;
	for (double b; cin >> b; ) a.pb(b);
	cout<< *max_element(all(a)) - *min_element(all(a)) << endl;
	
	return 0;
}

C++: #include <iostream>

using namespace std;


#define INF 1e307

int main()
{
	double max = 0;
	double min = INF;

	double height;

	while (cin >> height)
	{
		if (height > max) { max = height; }
		if (height < min) { min = height; }
	}

	cout << max - min << endl;

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
	int i=0;
	double a;
	vector <double> data;
	while(cin>>a){
		data[i]=a;
		i++;
	}
	sort(data.begin(),data.end());
	cout<<data[i]-data[0]<<endl;
	return 0;
}