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<algorithm>
using namespace std;
int main() {
	double mind, maxd, d;
	cin >> d;
	mind = d;
	maxd = d;
	while (cin >> d){
		mind = min(mind, d);
		maxd = max(maxd, d);
	}
	cout << maxd - mind << endl;
}

C++: #include <iostream>

using namespace std;

void solve()
{
	double height;
	double Max = 0;
	double Min = 99999999;
	while(cin >> height)
	{
		Max = max(Max, height);
		Min = min(Min, height);
	}
	cout << Max - Min << endl;
}

int main()
{
	solve();
	return(0);
}

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

int main(){
	double n;
	vector<double> vec;
	while(cin >> n){
		vec.push_back(n);
	}

	sort(vec.begin(), vec.end());

	cout << *(vec.end() - 1) - *vec.begin() << endl;
}

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

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

using namespace std;

int main()
{
    double c, l = numeric_limits<double>::max(), h = numeric_limits<double>::min();
    while( cin >> c ) {
        l = min( l, c );
        h = max( h, c );
    }

    cout << setprecision( 1 ) << fixed << h - l << endl;
}

C++: #include <stdio.h>

int main(){
	double n;
	double high,low;
	double ans;
	scanf("%lf",&n);
	high = n;
	low = n;
	while(scanf("%lf",&n) != EOF){
		if(high < n){
			high = n;
		}
		if(low > n){
			low = n;	
		}
	}
	ans = high - low;
	printf("%f\n",ans);
	return 0;
}

C++: #include<cstdio>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	float yama,max,min,x;
	max=-1;
	min=1000.0;
	while(scanf("%f",&yama)!=EOF){
		if(max<yama){
			max=yama;
		}
		else if(min>yama){
			min=yama;
		}
	}
	x=max-min;
	printf("%f\n",x);
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <ios>

using namespace std;

int main()
{
	double min, max;
  double x;

	cin >> x;
	min = x;
  max = x;

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

	streamsize prec = cout.precision();
  cout << fixed << setprecision(1) << max - min 
       << setprecision(prec) << endl;

  return 0;
}

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

int main(){
	double a;
	double ans=0;
	double ans2=51;
	while(cin>>a){
		ans=max(ans,a);
		ans2=min(ans2,a);
	}
	
	cout<<ans-ans2<<endl;
	return 0;
}

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

int main(){
	for(int i = 0; i < 999999; ++i){
		putchar('0');
	}

	puts("");
}

C++: #include <stdio.h>
 
int main(void) {
    double max,min,now;
    scanf("%lf",&max);
    min=max;
    while(1) {
        if(scanf("%lf",&now)==-1)break;
        if(now<min)min=now;
        if(now>max)max=now;
    }
    printf("%f\n",max-min);
    return 0;
}

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

int main(){

  double a[10000],n,a_max=0,a_min=1.79769e+308;
  int i=0;

  while(cin >> n){

    a_max = max(a_max,n);
    a_min = min(a_min,n);

  }

  a_max -= a_min;

  cout << a_max << endl;

}

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

int main(){
  double xmax=0,xmin=INT_MAX,ans,n[100000];

  int i=0;
  while(cin >> n[i]){
    xmax=max(xmax,n[i]);
    xmin=min(xmin,n[i]);
    i++;
}

  cout << xmax-xmin << endl;





}

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

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

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

int main() {
	double low = 1000000.0, high = 0.0;
	double n;
	while (cin >> n) {
		if (n < low) {
			low = n;
		}
		if (high < n) {
			high = n;
		}
	}
	cout << high - low << endl;
}

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

#define loop(v, f, l) for(int v = (f), v##_ = (l); v < v##_; ++v)

using namespace std;

typedef long long int lint;
static inline int in(){ int x; scanf("%d", &x); return (x); }
static inline lint inl(){ lint x; scanf("lld", &x); return (x); }

int main()
{
	double highest = 0.0;
	double lowest = DBL_MAX;
	double height;

	while( scanf("%lf", &height) != EOF )
	{
		if( height < lowest )lowest = height;
		if( height > highest ) highest = height;
	}
	printf("%.1lf\n", highest - lowest);
	return (0);
}

C++: #include<cstdio>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int i=0;
    double a[30000]={0};
    while(cin>>a[i]){
        i++;
    }
    sort(a,a+i);
    cout<<a[i-1]-a[0]<<endl;
    return 0;
}

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

int main(){
	double mt,max, min;
	cin>>mt;
	max=min=mt;
	while(cin>>mt){
		if(max<mt){
			max=mt;
		}else if(min>mt){
			min=mt;
		}
	}
	printf("%.1f\n", max-min);
	return 0;
}

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

using namespace std;

int main(){
	double mauntain[50];
	int j=0;
	double n;
	double max_height = 0.0;
	double min_height = 1000000.0;
	while(cin >> n){
		mauntain[j] = n;
		j++;
	}

	for(int i=0;i<j;i++){
		if(max_height < mauntain[i])max_height = mauntain[i];
	}

	for(int i=0;i<j;i++){
		if(min_height > mauntain[i])min_height = mauntain[i];
	}

	cout << max_height - min_height << endl;
}

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

int main() {
  double x, cnt=0;
  vector<double> a;
  while(cin >> x) {
    a.push_back(x);
    cnt++;
  }
  sort(a.begin(), a.end());
  double ans=a[cnt-1]-a[0];
  cout << ans << endl;
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int i = 0, h[50] ={};
	double height;
	
	while(cin >> height){
		h[i] == height;
		i ++;
	}
	
	int N = sizeof(h);
	
	double max = h[0], min = h[0];
	for(int i = 0; i < N; i++){
		if(max < h[i]) max = h[i];
	}
	for(int i = 0; i < N; i++){
		if(min > h[i]) min = h[i];
	}
	
	double ans = max - min;
	cout << ans << endl; 
}

C++: #include <iostream>
using namespace std;
int main(void)
{
	double h[10000];
	int ptr=0;
	while(cin >> h[ptr]){
		ptr++;
	}
	double max=h[0];
	double min=h[0];
	for(int i=1; i<ptr; i++){
		cout <<i<<endl;
		if(h[i]>max) max = h[i];
		if(h[i]<min) min = h[i];
	}
	printf("%.1f\n",max-min);
	return 0;
}

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

int main(){
  double max=-1.0, min=10000.0;
  double tmp;

  while(cin>>tmp){
    if(max<tmp) max=tmp;
    if(min>tmp) min=tmp;
  }
  printf("%ld\n", max-min);

  return 0;
}

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

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

	while( scanf("%lf", &n) != EOF ){
		h.push_back(n);
	}
	sort( h.begin() , h.end() );
	int i = h.size()-1;
	printf("%.1f\n", h[i]-h[0]);
	return 0;
}

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

int main()
{
	std::vector<double> v;
	double f;
	
	while( std::cin >> f ){
		v.push_back( f );
	}
	
	std::sort( v.begin(), v.end() );

	std::cout << v[v.size()-1] - v[0] << std::endl;

 	return 0;
}