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 <iomanip>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <string>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,P> pip;
typedef long long ll;
const int inf=(1<<31)-1;
const double pi=acos(-1);

double a,M=-1,m=inf;

int main(){
	while(cin>>a){
		M=max(M,a);
		m=min(m,a);
	}
	cout<<M-m<<endl;
}

C++: #include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main() {
	double a;
	cin >> a;
	double minn, maxx;
	minn = a;
	maxx = a;
	while (cin >> a){
		maxx = max(a, maxx);
		minn = min(a, minn);
		printf("%6f", maxx - minn);
		cout << endl;
	}
	char c;
	cin >> c;
}

C++: #include<iostream>
using namespace std;
int main()
{
double a,mi=10000,ma=-1;
while(cin >> a){
mi=min(mi,a);
ma=max(ma,a);
}
cout << ma-mi << "\n";
return 0;
}

C++: #include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string.h>
#include <math.h>
#include <time.h>
#include <stdlib.h>
using namespace std;



int main(){
	double a,max=0,min=1000000;
	while(scanf("%lf",&a) != EOF){
		if(a>max) max=a;
		if(a<min) min=a;
	}
	printf("%lf\n",max-min);
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	double ma=0,mi=1e10,t;
	while(cin>>t){
		ma=max(ma,t);
		mi=min(mi,t);
	}
	cout<<ma-mi<<endl;
	return 0;
}

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

using namespace std;

int main()
{
	double ma=0,mi=1000000000.0;
	double a;
	
	for(;cin >> a;)
	{
		ma=max(ma,a);
		mi=min(mi,a);
	}
	cout << ma-mi << endl;
}

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

int main()
{
double m,h,l;
while(cin>>m){
m=max(m,0.0);
l=min(m,0.0);
}
printf("%f\n",fabs(m-l));
return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;

int main(){
	float t,Max = 0,Min = 1000000;
	while(scanf("%f",&t) != EOF){
		Max = max(Max,t);
		Min = min(Min,t);
	}
	printf("%f\n",Max - Min);
	return 0;
}

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

int main(){
	double tmp,maxa,mina,dif,flag = 1;
	while(cin>>tmp){
		if(flag){
			flag = 0;
			maxa = mina = tmp;
		}
		else{
			maxa = max(tmp,maxa);
			mina = min(tmp,mina);
		}
	}
		dif = maxa - mina;
		printf("%.2f",dif);
	return 0;
}

C++: #include <iostream>

using namespace std;

main(){
  double in;
  long long min=999999999;
  long long max=-999999999;
  while(cin >> in){
    long long tmp=(long long)(in*100.0);
    if(min>tmp) min=tmp;
    if(max<tmp) max=tmp;
  }

  double ans=(double)(max-min)/100.0;
  printf("%.1f\n", ans);
  return 0;
}

C++: /*#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <set>
#include <map>
#include <numeric>
*/
#include <bits/stdc++.h>
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define rrep()
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF (int)1e9
#define INFL 1e18
#define MOD 1000000007
#define pb push_back
#define MP make_pair
typedef long long int ll;
typedef std::pair<int,int> P;
int D=1;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

int main(){
    vector<double> v;
    double x;
    while(cin>>x)v.pb(x);
    Sort(v);
    cout<<v[v.size()-1]-v[0]<<endl;
    
    return 0;
}

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

using namespace std;

int main(){
	int i = 0;
	float ansmax, ansmin = 100000;
	float mou[101];

	while(cin >> mou[i]){

		if(mou[i] == 0) break;

		ansmax = max(ansmax,mou[i]);
		ansmin = min(ansmin,mou[i]);

		i++;
	}

	cout << ansmax - ansmin << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
#define int long long
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define INF LLONG_MAX/3
#define eps LDBL_EPSILON
#define moder (1000000007)
#define pie acos(-1)
#define P std::pair<int,int>
#define prique priority_queue
#define ggr getchar();getchar();return 0;
using namespace std;
signed main(){
	double a[50]={};
	int i=0;
	for(;cin>>a[i];i++);
	sort(a,a+i);
	cout<<a[i-1]-a[0]<<endl;
}

C++: #include<stdio.h>
#include<math.h>
int main()
{
	double h[50],r=0;
	int i=0;
	while(scanf("%lf",&h[i])!=EOF){
		i++;
	}
	i--;
	for(int j=0;j<i;j++){
		for(int k=0;k<i;k++){
			if(r<fabs(h[k]-h[j])){
				r=fabs(h[k]-h[j]);
			}
		}
	}
	printf("%3lf",r);
	return 0;
}

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

C++: //↓template↓

#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n)  n.begin(),n.end()
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
const int SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
long long fac[200005], finv[200005], inv[200005];
vector<long long>dij;
struct edge { long long to, cost; };
vector<vector<edge> >G;

long long mod_pow(long long a, long long b) {
	long long res = 1, mul = a;
	for (int i = 0; i < 31; ++i) {
		if (b >> i & 1) {
			res *= mul;
			res %= MOD;
		}
		mul = (mul * mul) % MOD;
	}

	return res;
}

void addedge(int from, int to, int cost) {
	G[from].push_back({ to,cost });
	G[to].push_back({ from,cost });
}

//↑template↑

vector<double>v;
int main() {
	double n;
	while (cin >> n) { v.push_back(n); }
	sort(all(v));
	cout << setprecision(20) << v[v.size() - 1] - v[0] << endl;
}

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

int main(){
	double n;
	vector<double> v;
	while( cin >> n ){
		v.push_back( n );
	}
	double a = v[0];
	double b = v[0];
	for(int i=0 ; i < v.size() ; i++ ){
		a = max( a , v[i] );
		b = min( b , v[i] );
	}
	cout << (a-b) << endl;
}

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

C++: #include <iostream>
#include <set>
using namespace std;
int main(){
	double h;
	set<double> high;
	while(cin>>h){
		high.insert(h);
	}
	set<double>::iterator a=high.begin();
	set<double>::iterator b=high.end();
	double c=*b-*a;
	cout<<c<<endl;
	return 0;
}

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

int main(){
	const string tmp(1048574, '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 < 10; ++i){
		fputs(tmp.c_str(), stdout);
		fflush(stdout);
	}
	
	puts("");
}