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++: #define _CRT_SECURE_NO_WARNINGS
#include"bits/stdc++.h"
#ifdef _DEBUG
#define DBG(n) n
#else
#define DBG(n)
#endif
#define INF            1e9
#define INFLL          1e18
#define EPS            1e-9
#define REP(i,n)       for(ll i=0,i##_len=(n);i<i##_len;++i)
#define REP1(i,n)      for(ll i=1,i##_len=(n);i<=i##_len;++i)
#define REPR(i,n)      for(ll i=(n)-1;i>=0;--i)
#define REPR1(i,n)     for(ll i=(n);i>0;--i)
#define REPC(i,obj)    for(auto i:obj)
#define ALL(obj)       (obj).begin(),(obj).end()
#define SETP(n)        cout<<fixed<<setprecision(n)
#define VV(T,h,w)      move(vector<vector<T>>(h,vector<T>(w)))
#define VVI(T,h,w,i)   move(vector<vector<T>>(h,vector<T>(w,i)))
using namespace std;
using ll = long long;
template<typename T, ll h, ll w>using vec2 = vector<vector<T>>;
template<typename T = ll>inline T in() { T ret; cin >> ret; return ret; }

bool leap(ll y)
{
	return y % 400 == 0 || y % 100 != 0 && y % 4 == 0;
}
struct date {
	ll y, m, d;
	date operator++(int)
	{
		auto cpy = *this;
		switch (m) {
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12:
			d = d == 31 ? 1 : d + 1;
			if (d == 1)m = m == 12 ? 1 : m + 1;
			if (d == 1 && m == 1)++y;
			break;
		case 2:
			if (leap(y))d = d == 29 ? 1 : d + 1;
			else d = d == 28 ? 1 : d + 1;
			if (d == 1)m = 3;
			break;
		case 4:
		case 6:
		case 9:
		case 11:
			d = d == 30 ? 1 : d + 1;
			if (d == 1)++m;
			break;
		}
		return cpy;
	}
	bool operator==(const date&dt)
	{
		return y == dt.y && m == dt.m && d == dt.d;
	}
	bool operator!=(const date&dt)
	{
		return !(*this == dt);
	}
};
signed main()
{
	date d1, d2;
	while (cin >> d1.y >> d1.m >> d1.d >> d2.y >> d2.m >> d2.d, d1.y != -1) {
		ll ans = 0;
		while (d1++ != d2)++ans;
		cout << ans << endl;
	}
}

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

int main(){
int sc[14]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int yd=365;
int y1,y2,m1,m2,d1,d2;
bool f=false;
while(1){
	bool FB=false;
cin>>y1>>m1>>d1>>y2>>m2>>d2;
if(y1<0||y2<0||m1<0||m2<0||d1<0||d2<0)break;
int by=y1;
int ay=y2;
int dc=0;
if((by%4==0&&by%100!=0)||by%400==0){f=true;sc[2]=29;}

if(by!=ay){
for(int i=m1;i<=12;i++)
dc+=sc[i];
dc-=d1-1;FB=true;
by++;

for(int i=by;i<ay;i++){
if((i%4==0&&i%100!=0)||by%400==0)dc+=366;
else {dc+=365;}
}
by=ay;
m1=1;d1=1;
}
if((by%4==0&&by%100!=0)||by%400==0){f=true;sc[2]=29;}
else sc[2]=28;
for(int i=m1;i<m2;i++)
dc+=sc[i];

dc+=d2;
//if(FB==false)
dc-=d1;
cout<<dc<<endl;
}
return 0;
}

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

#define pb push_back
#define fr first
#define sc second
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<int,pii> pip; 
const int INF = (1<<25);
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

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;
    int total1=0,total2=0;
    for(int i=0;i<y1;i++){
      if(i%400==0 || (i%100!=0 && i%4==0)){
	total1+=366;
	 
      }else {
	total1+=365;
      }
    }

    for(int i=0;i<y2;i++){
      if(i%400==0 || (i%100!=0 && i%4==0)){
	total2+=366;
	  
      }else {
	total2+=365;
      }
    }

    for(int i=1;i<m1;i++){
      if(i==2){
	if(y1%400==0 || ( i%100!=0 || i%4==0)){
	  total1+=29;
	  
	}
	else total1+=28;
      }
      else if(i==4 || i==6 || i==9 || i==11){
	total1+=30;
      }
      else total1+=31;
    }
    
    for(int i=1;i<m2;i++){
      if(i==2){
	if(y2%400==0 || ( i%100!=0 && i%4==0)){
	    total2+=29;
	  
	}
	else total2+=28;
      }
      else if(i==4 || i==6 || i==9 || i==11){
	total2+=30;
      }
      else total2+=31;
    }

    total1+=d1;
    total2+=d2;
    cout<< total2-total1<< endl;
  }
}

C++: #include <iostream>
using namespace std;int main(){int a,b,c,d,e,f,g,h[13]={0,0,31,59,90,120,151,181,212,243,273,304,334};while(1){cin>>a>>b>>c>>d>>e>>f;if(y==-1)break;g=f-c+h[mm]-h[m]+(d-a)*365;if(e<3)d--;if(b<3)a--;g+=d/4-a/4-d/100+a/100+d/400-a/400;cout<<g<<endl;}return 0;}

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

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

int cntDay( int y, int m, int d, int* a )
{
    int sum = 0;

    for( int i = 1; i < m; i++ )
        sum += a[i];

    if( judgeLeapYear(y) && m > 2 )
        sum++;

    return sum + d;
}

int main()
{
    int a[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
    int y1, m1, d1, y2, m2, d2;

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

        int cntleap = 0;
        for( int i = y1; i < y2; i++ )
            if( judgeLeapYear(i) )
                cntleap++;

        int sum = cntDay( y2, m2, d2, a ) - cntDay( y1, m1, d1, a ) + 366 * cntleap + 365 * ( y2 - y1 - cntleap );
        cout << sum << endl;
    }

    return 0;
}

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

using namespace std;


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

typedef long long ll;

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

ll calcDays(ll y,ll m,ll d){
	ll sum=0;
	for(ll i = 0; i < y; i++){
		if(checkUru(i)){
			sum+=366;
		}
		else
			sum+=365;
	}
	for(ll i = 1; i < m; i++){
		if(checkUru(y)&&m==2){
			sum+=md[i]+1;
		}
		else
			sum+=md[i];
	}
	sum+=d;
	return sum;
}

int main(){

	ll 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)){
		ll sum=calcDays(y2,m2,d2)-calcDays(y1,m1,d1);
		cout<<sum<<endl;
	}

	return 0;
}

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

bool isLeepYear(int year) {
	return year%4==0 && (year%100!=0 || year%400==0);
}

int days[] =  { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int sdays[] = { 0, 31, 59, 90,120,151,180,212,243,273,304,334,365};
int FromNewYear(int year, int month, int day) {
	int count = 0;
	count += sdays[month-1];
	if(isLeepYear(year) && month>2) count += 1;
	count += day;
	return count;
}

int DaysInYear(int year) {
	return (isLeepYear(year) ? 366 : 365);
}

int main() {
	int y1, m1, d1, y2, m2, d2, ans;
	while(cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2) {
		ans = 0;
		if(y1==-1 && m1==-1 && d1==-1 && y2==-1 && m2==-1 && d2==-1) break;
		for(int y = y1+1; y<y2; ++y) {
			ans += DaysInYear(y);
		}
		if(y1!=y2) {
			ans += DaysInYear(y1)-FromNewYear(y1, m1, d1);
			ans += FromNewYear(y2, m2, d2);
		}else {
			ans += FromNewYear(y2, m2, d2) - FromNewYear(y1, m1, d1);
		}
		cout << ans << endl;
	}
	return 0;
}