Go: package main

import (
	"bufio"
		"os"
	"strings"
	"strconv"
		"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		input := strings.Split(scanner.Text(), " ")
		ele_t1 := [3]int{}
		ele_t2 := [3]int{}
		for i := range ele_t1 {
			ele_t1[i], _ = strconv.Atoi(input[i])
			ele_t2[i], _ = strconv.Atoi(input[i+3])
		}
		if ele_t1[0] < 0 || ele_t1[1] < 0 || ele_t1[2] < 0 ||
			ele_t2[0] < 0 || ele_t2[1] < 0 || ele_t2[2] < 0 {
				break
		}
		// t1 := time.Date(ele_t1[0], time.Month(ele_t1[1]), ele_t1[2], 0, 0, 0, 0, time.UTC)
		// t2 := time.Date(ele_t2[0], time.Month(ele_t2[1]), ele_t2[2], 0, 0, 0, 0, time.UTC)
		// diff := t2.Sub(t1)
		// fmt.Printf("%v\n", int64(diff/(time.Hour*24)))
		fmt.Println(ut2jd(ele_t2[0], ele_t2[1], ele_t2[2])-ut2jd(ele_t1[0], ele_t1[1], ele_t1[2]))
	}
}

func ut2jd(year, month, day int) int {
	if month <= 2 {
		year--
		month += 12
	}
	s := 3 + year/4 - year/100 + year/400
	s += 1720994 + year*365 + (month+1)*30 + (month+1)*3/5 + day
	return s
}

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

using namespace std;

int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

// 0??´1???1??\???????????\??°
long long int day_sum(int y, int m, int d){
	long long int ans;
	ans = 0;
	
	y--;
	
	ans += y * 365;
	ans += y / 4 - y / 100 + y / 400 + 1;
	
	for(int i = 0; i < m - 1; i++){
		ans += days[i];
	}
	ans += d - 1;
	if(((y % 4 == 0) * 2 - 1) * ((y % 100 == 0) * 2 - 1) * ((y % 400 == 0) * 2 - 1) > 0){
		if(m >= 3){
			ans++;
		}
	}
	return ans;
}

int main(){
	
	long long int y1, m1, d1, y2, m2, d2;
	while(true){
		cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
		if(y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2 < 0){
			break;
		}
		printf("%lld\n", day_sum(y2, m2, d2) - day_sum(y1, m1, d1));
	}
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int getday(int y, int m, int d)
{
    if (m <= 2) {
        --y;
        m += 12;
    }

    int dy = 365 * (y - 1);
    int c = y / 100;
    int dl = (y >> 2) - c + (c >> 2);
    int dm = (m * 979 - 1033) >> 5;
    return dy + dl + dm + d - 1;   

}

int main()
{
    int y1, m1, d1, y2, m2, d2;

    while (cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2) {
        if (y1 == -1 && m1 == -1 && d1 == -1 &&
            y2 == -1 && m2 == -1 && d2 == -1)
            break;

        cout << getday(y2, m2, d2) - getday(y1, m1, d1) << endl;
    }

    return 0;
}

C++: #include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;

int pls[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31};

int calc(int y, int m, int d){
  --y;
  int res = (y / 4 - y / 100 + y / 400) + y * 365 + d;
  ++y;
  if((!(y % 4) && (y % 100 || !(y % 400))) && (m >= 3)) ++res;
  REP(i, m) res += pls[i];
  return res;
}

int main() {
  int y1, m1, d1, y2, m2, d2;
  while(cin >>y1 >>m1 >>d1 >>y2 >>m2 >>d2 && (y1 >= 0 && m1 >= 0 && d1 >= 0 && y2 >= 0 && m2 >= 0 && d2 >= 0)) cout <<calc(y2, m2, d2) - calc(y1, m1, d1) <<endl;
  return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    int month[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

    for(;;){
        int y[2], m[2], d[2];
        for(int i=0; i<2; ++i){
            cin >> y[i] >> m[i] >> d[i];
            if(y[i] < 0 || m[i] < 0 || d[i] < 0)
                return 0;
        }

        long long sum[2] = {0};
        for(int i=0; i<2; ++i){
            for(int j=1; j<y[i]; ++j){
                sum[i] += 365;
                if(j % 400 == 0 || (j % 100 != 0 && j % 4 == 0))
                    ++ sum[i];
            }
            for(int j=1; j<m[i]; ++j){
                sum[i] += month[j];
                if(j == 2 && (y[i] % 400 == 0 || (y[i] % 100 != 0 && y[i] % 4 == 0)))
                    ++ sum[i];
            }
            sum[i] += d[i];
        }

        cout << (sum[1] - sum[0]) << endl;
    }
}

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

using namespace std;

bool isUruu(int y){
    if(y%4 != 0) return false;
    else {
        if(y%400 == 0) return true;
        else if(y%100 == 0) return false;
        else return true;
    }
}

int getDay(int y, int m){
    if(!isUruu(y)){
        switch(m){
            case 2:
                return 28;
                break;
            case 4:
            case 6:
            case 9:
            case 11:
                return 30;
                break;
            default:
                return 31;
                break;
        }
    }
    else {
        switch(m){
            case 2:
                return 29;
                break;
            case 4:
            case 6:
            case 9:
            case 11:
                return 30;
                break;
            default:
                return 31;
                break;
        }
    }
}

int main(){
    int y1, m1, d1, y2, m2, d2;
    while(cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2, y1+m1+d1+y2+m2+d2 != -6){
        int ans = 0;
        ans = d2-d1;
        if(!(y1 == y2 && m1 == m2)) ans += getDay(y1, m1);
        m1++;
        if(12 < m1){y1++; m1=1;}
        while(1){
            if(y1 == y2 && m1 >= m2) break;
            ans += getDay(y1, m1);
            m1++;
            if(12 < m1){y1++, m1 = 1;}
        }
        cout << ans << endl;
    }
}

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

int Emonth[12] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };

long long daycount(int year , int month , int day)
{
	long long total = 0;
	total += year * 365;		//year??´1???1??\?????§?????\??°

	total += Emonth[month-1];			//1???1??\???month???1??\?????§?????\??°(???????????´??????????????????)
	
	total += year / 4;
	total -= year / 100;
	total += year / 400;		//???????????´????????°

	if (((year % 4 == 0) && (year % 100 != 0 || year % 400 == 0)) && (month < 3))
	{
		total--;		//???????????´??????2???29??\??????????????????????????§?????????????????????
	}

	total += day;		//1??\???day??\?????§?????\??°

	return total;
}


int main()
{
	int y1, y2, m1, m2, d1, d2;
	while (1)
	{
		long long total1 = 0, total2 = 0;
		cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
		if (y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2< 0) break;

		total1 = daycount(y1, m1, d1);
		total2 = daycount(y2, m2, d2);

		cout << total2 - total1 << endl;

	}


	return 0;
}