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 scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MIN -1
#define MAX 1000000
int main(void)
{
	double  min = MAX, max = MIN,x;
	while (scanf_s("%lf",&x) != EOF) {
		if (x > max) max = x;
		if (x < min) min = x;
	}
	printf("%f\n", max - min);
}

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

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

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

int main()
{
    double height;
    double max = 0.0, min = 10000000;
    while( cin >> height )
    {
        if( max < height )
            max = height;
        if( min > height )
            min = height;
    }
    cout << max - min << 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());
	double a = *pv;
	pv = v.end();
	double b = *pv;
	cout << b - a << endl;
	return 0;
}

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

int main(){
  vector<double> h;
  double in;
  while(cin >> in){
	h.push_back(in);
  }
  sort(h.begin(),h.end());
  cout << h[h.size()-1]-h[0] << endl; 
  return 0;
}

C++: #include <iostream>
#include<cmath>
using namespace std;
double high=0,low=10000001,a;
int main() {
while(cin>>a){
high=max(high,a);
low=min(low,a);}
cout<<high-low<<endl;
	return 0;
}

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

#define INF 100000000000.0
using namespace std;

int main(void){

	double high,min=INF,max=-1*INF;

	while(scanf("%d",&high)!=EOF){
		if(max<high) max=high;
		if(min>high) min=high;
	}

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


	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
	vector<double>h;
	double x;
	while (cin >> x) {
		h.push_back(x);
	}
	cout << *max_element(h.begin(), h.end()) - *min_element(h.begin(), h.end()) << endl;
	return 0;
}

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

int main(){
	double mountain, max = -1, mini = -1;
	while (scanf("%lf", &mountain) != EOF){
		if (max == -1 || mountain > max) max = mountain;
		if (mini == -1 || mountain < mini) mini = mountain;
	}
	printf("%.1f\n", max - mini);
	return 0;
}

C++: #include<cstdio>
#define MAX(x,y) ((x>y)? x:y)
#define MIN(x,y) ((x>y)? y:x)

 double max=0.0,min=0.0;

int main()
{
	double n;
	while(scanf("%lf",&n)!=EOF)
	{
		if(max==0.0&&min==0.0)
		{
			max=n;
			min=n;
		}
		max=MAX(max,n);
		min=MIN(min,n);
	}
	printf("%lf",max-min);
	return 0;
}

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

using namespace std;

int main()
{
  vector<double> seq;

  double tmp;
  while (cin >> tmp)
    seq.push_back(tmp);

  double vmax = *max_element(seq.begin(), seq.end());
  double vmin = *min_element(seq.begin(), seq.end());

  cout << vmax - vmin << endl;
}

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

using namespace std;

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

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;
		} else if(tmp < min){
			min = tmp;
		}
	}
	
	cout << (double)(max - min) << endl;
	
	return 0;
}

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

int main()
{
  double a, ma = 0, mi = 100000000000;

  while (cin >> a){
    ma = max(a, ma);
    mi = min(a, mi);
  }
  cout << ma - mi << endl;
}

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 <queue>
#include <iterator>
#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;

//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 gcd(int a, int b){
   int tmp;
   while(a%b==0){
      tmp=a%b;
      a=b;
      b=tmp;
   }
}

int lcm(int a,int b){
   return a*b/gcd(a,b);
}

bool prime_number(int n){
   vector<bool> i;
   if(n < 2){
      return false;
   }
   else if(n == 2){
      return true;
   }
   if(n % 2 == 0){
      return false;
   }
   for(int i=3;i<=n/i;i+=2){
      if(n % i == 0) return false;
      return true;
   }
}

int main(){
   vector<double> a;
   double b;
   
   while(cin >> b){
      a.PB(b);
   }
   cout << *max_element(a.begin(), a.end())
   - *min_element(a.begin(), a.end()) << endl;
}

C++: #include <cmath>
#include <iostream>
using namespace std;
int main() {
  double a, b = 0.0, c = INFINITY;
  while (cin >> a) {
    if (a > b) b = a;
    if (a < c) c = a;
  }
  cout << (b - c) << endl;
  return 0;
}

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

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

C++: #include<iostream>
using namespace std;int main(){double l,m,n=1e5;for(;cin>>l;m<l?m=l:l,n>l?n=l:l);cout<<m-n<<endl;}

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

int main() {
  int i; double d[10000]={};
  for(i=0;cin>>d[i];i++);
  sort(d,d+i,greater<int>());
  cout<<d[0]-d[i-1]<<endl;
  return 0;
}

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