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)
}

Python: #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin

upper = lower = float(stdin.readline())
for line in stdin:
    h = float(line)
    if h > upper:
        upper = h
    elif h < lower:
        lower = h
print(upper - lower)

Python: high_max=0
high_low=1000000
while True:
    try:
        N=float(input())
        if N>high_max:high_max=N
        elif N<high_low:high_low=N
    except:
        ans=high_max-high_low
        print("{:.1f}".format(ans))
        break

Python: import sys

data = []
for line in sys.stdin:
  try:
    data.append(float(line))
  except:
    break
print(max(data) - min(data))

Python: height_lst = []
 
while True:
  try:
    height = float(input())
    height_lst.append(height)
 
  except EOFError:
    break

height_lst.sort()
print(height_lst[-1] - height_lst[0])

Python: d = []
while True:
    try:
        d.append(float(input()))
    except EOFError:
        break
print(max(d)-min(d))

Python: max=-1e10
min=1e10

while True:
    try:
        n = float(input())
    except:
        break

    if max < n:
        max = n
    elif min > n:
        min = n

print( max - min)

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

C++: #include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
double x[100000], maxn;int  cnt;
int main() {
	while (cin >> x[cnt]) {
		cnt++;
	}
	for (int i = 0; i < cnt; i++) {
		for (int j = i; j < cnt; j++) {
			maxn = max(maxn, abs(x[i] - x[j]));
		}
	}
	cout << maxn << endl;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, m, n) for(int i=(m); i<(n); ++i)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define Cout(x) cout << (x) << endl
#define Cout2(x, y) cout << (x) << " " << (y) << endl
#define dump(x) cout << #x << " = " << (x) << endl;
#define forauto(i, a) for(auto i : a)cout << i << " "; puts("");
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
const int inf = 1e9;
const double pi = acos(-1.0);

int main() {
	double h;
	double mi = (double)inf, ma = 0;
	while (cin >> h) {
		mi = min(mi, h);
		ma = max(ma, h);
	}

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

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

int main(){
	double t,h,l;
	cin>>l;
	h=l;
	while(cin>>t){
		h=max(h,t);
		l=min(l,t);
	}
	cout<<h-l<<endl;
}

C++: #include <iostream>

using namespace std;

int main() {
	double m, max_m=-1.0, min_m=1000000000;
	while (cin >> m) {
		if (m < min_m) min_m = m;
		else if (m > max_m) max_m = m;
	}
	double ans = max_m - min_m;
	cout << ans << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <map>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

int main() {
    double highest = INT_MIN;
    double lowest = INT_MAX;
    double h;
    while(cin >> h) {
        highest = max(highest, h);
        lowest = min(lowest, h);
    }
    printf("%.3f\n", highest- lowest);
    return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

int main()
{
  double mountain[55]={};
  int i=0,j;
  while(scanf("%lf",&mountain[i])!=EOF)
    i++;
  double high=0.0,low=1000000.0;
  rep(j,i){
    high=max(high,mountain[j]);
    low=min(low,mountain[j]);
  }
  printf("%.1f\n",high-low);
}

C++: #include<iostream>
int main()
{
	double min = 1000001, max = -1;
	for (double height; std::cin >> height;)
	{
		if (min > height)min = height;
		if (max < height)max = height;
	}
	std::cout << max - min << std::endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
        double d;
        double max = -0.1, min = 1000000.1;

        while (cin >> d) {
                max = (max < d) ? d : max;
                min = (min > d) ? d : min;
        }

        cout << (max - min) << endl;

        return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<cstdio>
#include<cstdlib>
using namespace std;
#define REP(i,a,n) for(int i = a ; i < n ; i++)
#define rep(i,n) REP(i,0,n)

typedef long long ll;

double t[1000000];

void solve(){
}

int main(){
  int n = 0;
  for(int i=0;cin>>t[i];i++,n++);
  sort(t,t+n);
  printf("%.1f\n",t[n-1]-t[0]);
}

C++: #include <iostream> //üoÍ

using namespace std;

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

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

  
int main(){
	double hmax, hmin;
	double h;

	bool f = true;

	while(cin >> h){
		if(f){
			hmax = h;
			hmin = h;
			f = false;
		}else{
			hmax = max(hmax, h);
			hmin = min(hmin, h);
		}
	}

	cout << hmax-hmin << endl;

	return 0;
}

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

int main() {
	vector<double>v;
	vector<double>::iterator pv=v.begin();
	double d;
	while (cin >> d) {
		v.push_back(d);
	}
	sort(v.begin(), v.end());
	int z = v.size();
	double a = v[z - 1];
	double b = v[0];
	double c = a - b;
	cout << c << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(int argc, char *argv[]) {
  double min, max, tmp;

  cin >> tmp;
  min = max = tmp;
  while (cin >> tmp) {
    if (tmp < min)
      min = tmp;
    if (tmp > max)
      max = tmp;
  }
  cout << max-min << endl;
  return 0;
}

C++: #include <iostream>
 
using namespace std;
 
int main(int argc, char **argv)
{
    double max, min, tmp;
     
    cin >> max;
    min = max;
     
    while(cin >> tmp){
        if(max < tmp){
            max = tmp;
        } elseif (tmp < min){
            min = tmp;
        }
    }
     
    cout << (double)(max - min) << endl;
     
    return 0;
}

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

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  double h, h_max = 0, h_min = 1e7;
  while (cin >> h) {
    h_max = max(h_max, h);
    h_min = min(h_min, h);
  }
  cout << h_max - h_min << endl;

  return 0;
}

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

using namespace std;
int main(){

  vector<double> n;  
  double a;
  int i=0;
  while(cin >> a){
    n.push_back(a);
    i++;
  }
  sort(n.begin(),n.end());

  cout << n[i-1] - n[0] << endl;

 
 return 0;
}