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>
using namespace std;

int main() {
	int y,m,d,Y,M,D,i,b,c,yday,mday,day;
	int sum,n,uru,nuru;
	for(;;){
		
		if(y==-1||m==-1||d==-1||Y==-1||M==-1||y==-1){
			break;
		}
		
		
	
	cin>>y>>m>>d>>Y>>M>>D;
	
	
	
	
	yday=(Y-y)*365;
	mday=(M-m)*30;
	day=D-d;
	uru=(Y-y)/4;
	if(y%4==0){
		uru=uru+1;
	}
	
	if(1900>y&&Y>=1900){
		uru=uru-1;
	}if(2000>y&&Y>=2000){
		uru=uru-1;
	}if(2100>y&&Y>=2100){
		uru=uru-1;
	}if(2200>y&&Y>=2200){
		uru=uru-1;
	}if(2300>y&&Y>=2300){
		uru=uru-1;
	}if(2400>y&&Y>=2400){
		uru=uru-1;
	}if(2500>y&&Y>=2500){
		uru=uru-1;
	}if(2600>y&&Y>=2600){
		uru=uru-1;
	}if(2700>y&&Y>=2700){
		uru=uru-1;
	}if(2800>y&&Y>=2800){
		uru=uru-1;
	}if(2900>y&&Y>=2900){
		uru=uru-1;
	}
	
	sum=yday+mday+day+uru;
	
	if(m<=2&&2<=M&&m!=M){
		sum+=1;
	}
	if(m<=4&&4<=M&&m!=M){
		sum+=1;
	}
	if(m<=6&&6<=M&&m!=M){
		sum+=1;
	}
	if(m<=9&&9<=M&&m!=M){
		sum+=1;
	}
	if(m<=12&&12<=M&&m!=M){
		sum+=1;
	}
	
	
	if(Y%400==0&&y%400==0&&Y!=y){
		
		sum=sum+1;
	}
	
	if(sum!=0){
	printf("%d\n",sum);
	}
}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<string>
#include<cstring>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<bitset>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;

#define PI 3.141592653589793238462643383279
#define mod 1000000007LL
#define rep(i, n) for(i = 0;i < n;++i)
#define rep1(i, n) for(i = 1;i < n;++i)
#define per(i, n) for(i = n - 1;i > -1;--i)
#define int(x) int x; scanf("%d",&x)
#define int2(x, y) int x, y; scanf("%d%d",&x, &y)
#define int3(x, y, z) int x, y, z; scanf("%d%d%d",&x, &y, &z)
#define int4(v, x, y, z) int v, x, y, z; scanf("%d%d%d%d", &v, &x, &y, &z)
#define int5(v, w, x, y, z) int v, w, x, y, z; scanf("%d%d%d%d%d", &v, &w, &x, &y, &z)
#define ll2(x, y) ll x, y; cin >> x >> y;
#define scn(n, a) rep(i, n)cin >> a[i]
#define sc2n(n, a, b) rep(i, n)cin >> a[i] >> b[i]
#define pri(x) cout << (x) << "\n"
#define pri2(x, y) cout << (x) << " " << (y) << "\n"
#define pri3(x, y, z) cout << (x) << " " << (y) << " " << (z) << "\n"
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define endl "\n"
#define kabe puts("---------------------------")
#define kara puts("")
#define debug(x) cout << " --- " << (x) << "\n"
#define debug2(x, y) cout << " --- " << (x) << " " << (y) << "\n"
#define debug3(x, y, z) cout << " --- " << (x) << " " << (y) << " " << (z) << "\n"
#define X first
#define Y second
#define eps 0.0001
#define prid(x) printf("%.15lf\n", x)

int daycnt(int y, int m, int d){
  ll res = 0; //1y1m1d
  if(m == 2)res += 31;
  else if(m == 3)res += 59;
  else if(m == 4)res += 90;
  else if(m == 5)res += 120;
  else if(m == 6)res += 151;
  else if(m == 7)res += 181;
  else if(m == 8)res += 212;
  else if(m == 9)res += 243;
  else if(m == 10)res += 273;
  else if(m == 11)res += 304;
  else if(m == 12)res += 334;
  if(m > 2 && y % 4 == 0)++res;
  --y; res += y * 365 + y / 4 - y / 100 + y / 400;
  --d; res += d;
  return res;
}

signed main(void){
  int i, j;
  //pri(daycnt(1, 1, 1));
  for(int testcase = 0;testcase >= 0;testcase++){
    int y, m, d, x, l, c;
    scanf("%d%d%d%d%d%d", &y, &m, &d, &x, &l, &c);
    if(y < 0 || m < 0 || d < 0 || x < 0 || l < 0 || c < 0)break;

    pri(daycnt(x, l, c) - daycnt(y, m, d));

//*/

//*/ break;
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int year[2],month[2],day[2];
    while(cin>>year[0]>>month[0]>>day[0]>>year[1]>>month[1]>>day[1]){
        bool en=0;
        for(int i=0;i<2;i++)if(year[i]<0||month[i]<0||day[i]<0)en=1;
        if(en)break;
        int ans=0;
        for(int i=year[0];i<=year[1];i++){
            ans+=365;
            if(i%4==0&&i%100!=0||i%400==0)ans+=1;
        }
        ans+=day[1]-day[0];
        for(int i=1;i<month[0];i++){
            if(i==2)ans-=28;
            else if(i==4||i==6||i==9||i==11)ans-=30;
            else ans-=31;
        }
        for(int i=month[1];i<13;i++){
            if(i==2)ans-=28;
            else if(i==4||i==6||i==9||i==11)ans-=30;
            else ans-=31;
        }
        if((year[0]%4==0&&year[0]%100!=0||year[0]%400==0)&&month[0]>=2)ans-=1;
        if((year[1]%4==0&&year[1]%100!=0||year[1]%400==0)&&month[1]<=2)ans+=1;
        cout<<ans<<endl;
    }
}

C++: #include <cstdio>

const int days[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
const int ldays[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

bool isLeapYear(int year)
{
  if (year%400 == 0 || (year%4 == 0 && year%100 != 0))
    return true;
  return false;
}

int main()
{
  int y1, m1, d1, y2, m2, d2;
  while (~scanf("%d %d %d %d %d %d", &y1, &m1, &d1, &y2, &m2, &d2)) {
    if (y1 == -1 || m1 == -1 || d1 == -1 || y2 == -1 || m2 == -1 || d2 == -1)
      break;

    int start = 0, end = 0;
    for (int i = 1; i < y1; ++i) {
      if (isLeapYear(i))
	start += 366;
      else
	start += 365;
    }
    end = start;
    for (int i = y1; i < y2; ++i) {
      if (isLeapYear(i))
	end += 366;
      else
	end += 365;
    }

    for (int i = 1; i < m1; ++i) {
      if (isLeapYear(y1))
	  start += ldays[i];
      else
	start += days[i];
    }
    for (int i = 1; i < m2; ++i) {
      if (isLeapYear(y2))
	end += ldays[i];
      else
	end += days[i];
    }

    printf("%d\n", end+d2-start-d1);
  }
  return 0;
}

C++: #include<stdio.h>
int m[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int main(){
	int a,b,c,d,e,f;
	while(1){
		scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);
		if(a<0||b<0||c<0||d<0||e<0||f<0)break;
		a--;d--;
		int one=a*365+a/4-a/100+a/400,two=d*365+d/4-d/100+d/400;
		a++;d++;
		for(int i=0;i<b-1;i++)one+=m[i];
		for(int i=0;i<e-1;i++)two+=m[i];
		one+=c;two+=f;
		if(b>2&&(a%4==0&&((a%100==0&&a%400==0)||a%100)))one++;
		if(e>2&&(d%4==0&&((d%100==0&&d%400==0)||d%100)))two++;
		printf("%d\n",two-one);
	}
}