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<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<cstdlib>
#include<iomanip>
#include<queue>
#include<set>

using namespace std;

bool isLeap(int year)
{
    if (year % 400 == 0)
    {
        return true;
    }
    
    if (year % 100 == 0)
    {
        return false;
    }
    
    return (year % 4 == 0);
}

long long dateSerial(int year, int month, int day)
{
    static int days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
    
    long long res = day;
    
    for (int i = 0; i < month - 1; i++)
    {
        res += days[i];
        
        if(isLeap(year) && i == 1)
        {
            res++;
        }
    }
    
    for (int i = 1; i < year; i++)
    {
        res += 365;
       
        if (isLeap(i))
        {
            res++;
        }
    }
    
    return res;
}

void Solution()
{
    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;
        }
        
        long long date1 = dateSerial(y1, m1, d1);
        long long date2 = dateSerial(y2, m2, d2);
        
        cout<<date2 - date1<<endl;
    }
}

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

C++: #include <stdio.h>
#include <cmath>
#include <algorithm>
#include <stack>
 
using namespace std;
 
int num[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
 
bool isLeapYear(int year){
    if(year % 4 != 0)return false;
    else{
        if(year % 100 == 0){
            if(year%400 == 0)return true;
            else{
                return false;
            }
        }else{
            return true;
        }
    }
}
 
int main(){
 
    int year1,month1,day1,year2,month2,day2,sum;
 
    while(true){
        scanf("%d %d %d %d %d %d",&year1,&month1,&day1,&year2,&month2,&day2);
        if(year1 < 0 || month1 < 0 || day1 < 0 || year2 < 0 || month2 < 0 || day2 < 0)break;
 
        sum = 0;
 
        if(year1 == year2 && month1 == month2){
            printf("%d\n",day2-day1);
        }else if(year1 == year2){
 
            if(month1 == 2 && isLeapYear(year1) == true){
                sum += 29 - day1;
            }else{
                sum += num[month1] - day1;
            }
            for(int i=month1+1; i < month2; i++){
                if(i == 2 && isLeapYear(year1) == true){
                    sum += 29;
                }else{
                    sum += num[i];
                }
            }
            sum += day2;
 
            printf("%d\n",sum);
        }else{
 
            if(month1 == 2 && isLeapYear(year1)){
                sum += 29 - day1;
            }else{
                sum += num[month1] - day1;
            }
 
            for(int i = month1 + 1; i <=12; i++){
                if(i == 2 && isLeapYear(year1) == true){
                    sum += 29;
                }else{
                    sum += num[i];
                }
            }
 
            for(int i = year1+1; i < year2; i++){
                if(isLeapYear(i) == true)sum += 366;
                else{
                    sum += 365;
                }
            }
 
            for(int i=1; i < month2; i++){
                if(i == 2 && isLeapYear(year2) == true)sum += 29;
                else{
                    sum += num[i];
                }
            }
 
            sum += day2;
 
            printf("%d\n",sum);
 
        }
 
 
    }
 
    return 0;
}

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

int main(){
	int x=28;
	int W=365;
	int cal[13]={0,31,x,31,30,31,30,31,31,30,31,30,31};
	int cal2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	int y1,m1,d1,y2,m2,d2;
	bool F=false;
	while(1){F=false;
		int ans=0;
		cin>>y1>>m1>>d1>>y2>>m2>>d2;if(y1<0||m1<0||d1<0||y2<0||m2<0||d2<0)break;
		if(y1!=y2){
			if(y1%4==0)F=true;
			if(y1%100==0)F=false;
			if(y1%400==0)F=true;

			if(F==false)cal[2]=28;
			else cal[2]=29;
			ans+=cal[m1]-d1+1;
			//cout<<ans<<endl;
			for(int i=m1+1;i<=12;i++)
			{ans+=cal[i];
		//	cout<<ans<<endl;
			}
			d1=1;m1=1;y1++;
			//cout<<ans<<endl;
		}
		while(y1!=y2){F=false;
				if(y1%4==0)F=true;
			if(y1%100==0)F=false;
			if(y1%400==0)F=true;
			if(F==false)W=365;
			else  W=366;
			ans+=W;
			y1++;
			//cout<<ans<<endl;
		}
		while(m1!=m2){F=false;
			if(y1%4==0)F=true;
			if(y1%100==0)F=false;
			if(y1%400==0)F=true;

			if(F==false)cal[2]=28;
			else cal[2]=29;

			for(int i=m1;i<m2;i++)
				ans+=cal[i];
			m1=m2;
		}
		ans+=d2-d1;
		cout<<ans<<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;
    long long 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 days(int y, int m, int d)
{
    if (m < 3) {
        --y;
        m += 12;
    }
    return 365 * y + y / 4 - y / 100 + y / 400 + (306 * (m + 1)) / 10 + d - 428;
}

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 << days(y2,m2,d2) - days(y1,m1,d1) << endl;
    }
    return 0;
}