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<stdio.h>
#include<time.h>

int main(void)
{
  while(1)
    {
      time_t unix_t=time(0);
      struct tm car[2]={};
      time_t tim[2];
      int judge=0;

      for(int i=0;i<2;i++)
        {
          scanf("%d", &car[i].tm_year);
          if(car[i].tm_year==-1)
            judge=1;
          scanf("%d", &car[i].tm_mon);
          if(car[i].tm_mon==-1)
            judge=1;
          scanf("%d", &car[i].tm_mday);
          if(car[i].tm_mday==-1)
            judge=1;
          car[i].tm_year-=1900;
          car[i].tm_year-=1;
          tim[i]=mktime(&car[i]);
        }
      if(judge)break;

      printf("%ld\n",(tim[1]-tim[0])/86400);
    }

  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int y1,m1,d1,y2,m2,d2;
	while(scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2),y1>0)
	{
		int begin=y1+(m1>2), end=y2+(m2>2),c=0,i;
		for(i=begin;i<=end;++i)
			if(i%400==0 || i%100&&i%4==0)
				c++;
		int a[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
		for(i=1;i<m1;++i) d1+=a[i];
		for(i=1;i<m2;++i) d2+=a[i];
		printf("%d\n",(y2-y1-(d1>d2))*365+(d2-d1)+c);
	}
	return 0;
}

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

int ytod( int year )
{
	bool leap = false;
	if( year % 4 == 0 ){
		if( year % 100 == 0 ){
			if( year % 400 == 0 ){
				leap = true;
			}
		}else{
			leap = true;
		}
	}

	return ( 365 + ( leap ? 1 : 0 ) );
}

int mtod( int month, int year )
{
	int monthes[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
	int ret = monthes[ month ];
	if( month == 2 ){
		ret += ( ytod( year ) == 365 ? 0 : 1 );
	}
	return ret;
}

int dateToSerial( int year, int month, int day )
{
	int serial = 0;
	year -= 1;
	serial = year * 365 + ( year / 4 - year / 100 + year / 400 );
	for( int i = 1; i < month; ++i ){
		serial += mtod( i, year + 1 );
	}
	serial += day;
	return serial;
}

int main()
{
	int y1, m1, d1, y2, m2, d2;
	while( cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2 ){
		if( y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2 < 0 ){
			break;
		}
		cout << dateToSerial( y2, m2, d2 ) - dateToSerial( y1, m1, d1 ) << endl;
	}
	return 0;
}

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(){
	
	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;
 
bool isLeap(int y)
{
    if(y%400==0)    return true;
    if(y%100==0)    return false;
    if(y%4==0)      return true;
    return false;
}
 
int NumberOfDays(int y,int m,int d)
{
    int num=0;
    int mon[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    if(isLeap(y))   mon[2]++;
 
    for(int i=1;i<y;i++) num+=isLeap(i)?366:365;
    for(int i=1;i<m;i++) num+=mon[i];
    num+=d-1;
 
    return num;
}
 
int main()
{
    int y1,m1,d1,y2,m2,d2;
    while(cin>>y1>>m1>>d1>>y2>>m2>>d2){
        if(!(~y1&&~m1&&~d1&&~y2&&~m2&&~d2)) break;
        cout<<NumberOfDays(y2,m2,d2)-NumberOfDays(y1,m1,d1)<<endl;
    }
    return 0;
}

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

// ??????0??´??????????????\????????????

int main(){
	
	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 x[5000000], day[13][32], day2[13][32], cnt, a, b, c, d, e, f, daya1, daya2;
int days[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 };
int days2[13] = { 0,31,29,31,30,31,30,31,31,30,31,30,31 };
int main() {
	for (int i = 1; i < 5000000; i++) {
		if ((i % 4 == 0 && i % 100>0) || i % 400 == 0) {
			x[i] = x[i - 1] + 366;
		}
		else {
			x[i] = x[i - 1] + 365;
		}
	}
	for (int i = 1; i <= 12; i++) {
		for (int j = 1; j <= days[i]; j++) {
			day[i][j] = cnt;
			cnt++;
		}
	}
	cnt = 0;
	for (int i = 1; i <= 12; i++) {
		for (int j = 1; j <= days2[i]; j++) {
			day2[i][j] = cnt;
			cnt++;
		}
	}
	while (true) {
		cin >> a >> b >> c >> d >> e >> f;
		if (a < 0) { break; }
		if (b < 0) { break; }
		if (c < 0) { break; }
		if (d < 0) { break; }
		if (e < 0) { break; }
		if (f < 0) { break; }
		daya1 = 0; daya2 = 0;
		daya1 += x[a - 1];
		daya2 += x[d - 1];
		if (a % 4 == 0) {
			daya1 += day2[b][c];
		}
		else {
			daya1 += day[b][c];
		}
		if (d % 4 == 0) {
			daya2 += day2[e][f];
		}
		else {
			daya2 += day[e][f];
		}
		cout << daya2 - daya1 << endl;
	}
}

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

int getDays(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;
  string s;
  while (cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2) {
    if (y1 < 0) break; 
    int t1 = getDays(y1, m1, d1);
    int t2 = getDays(y2, m2, d2);
    cout << t2 - t1 << endl;
  }
  return 0;
}