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>
int main(void){
	int y1,m1,d1,y2,m2,d2;
	int i;
	int y1day,y2day;
	while(1){
		scanf("%d %d %d %d %d %d",&y1,&m1,&d1,&y2,&m2,&d2);
		y1day=y2day=0;
		if(y1==-1 || m1==-1 || d1==-1 || y2==-1 || m2==-1  || d2==-1) break;
		y1day=y2day=0;
		for(i=1;i<y1;i++){
			y1day+=365;
			if((i%4==0 && i%100!=0) || i%400==0) y1day++;
		}
		for(i=1;i<m1;i++){
			y1day+=31;
			if(i==4 || i==6 || i==9 || i==11) y1day-=1;
			if(i==2){
				y1day-=3;
				if((y1%4==0 && y1%100!=0) || y1%400==0) y1day++;
			}
		}
		y1day+=d1;
		for(i=1;i<y2;i++){
			y2day+=365;
			if((i%4==0 && i%100!=0) || i%400==0) y2day++;
		}
		for(i=1;i<m2;i++)	{
			y2day+=31;
			if(i==4 || i==6 || i==9 || i==11) y2day--;
			if(i==2){
				y2day-=3;
				if((y2%4==0 && y2%100!=0) || y2%400==0) y2day++;
			}
	//		printf("y2d==%d\n",y2day);
		}
		y2day+=d2;
	//	printf("%d %d\n",y1day,y2day);
		printf("%d\n",y2day-y1day);
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

bool is_uruu(int y) {
	bool uruu = false;
	if (!(y % 4))uruu = true;
	if (!(y % 100))uruu = false;
	if (!(y % 400))uruu = true;
	return uruu;
}
int main() {
	int y1, m1, d1, y2, m2, d2;
	int m[]{ 31,28,31,30,31,30,31,31,30,31,30,31 }, uruu_m[]{ 31,29,31,30,31,30,31,31,30,31,30,31 };
	while (cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2, y1 >= 0 && m1 >= 0 && d1 >= 0 && y2 >= 0 && m2 >= 0 && d2 >= 0) {
		int cnt = 0;
		for (int i = y1; i < y2; i++) {
			cnt += 365;
			if (is_uruu(i))cnt++;
		}
		if (is_uruu(y1)) {
			for (int i = 0; i < m1 - 1; i++)cnt -= uruu_m[i];
			cnt -= d1 - 1;
		}
		else {
			for (int i = 0; i < m1 - 1; i++)cnt -= m[i];
			cnt -= d1 - 1;
		}
		if (is_uruu(y2)) {
			for (int i = 0; i < m2 - 1; i++)cnt += uruu_m[i];
			cnt += d2;
		}
		else {
			for (int i = 0; i < m2 - 1; i++)cnt += m[i];
			cnt += d2;
		}
		cout << cnt - 1 << endl;
	}
}

C++: #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
long y1,m1,d1,y2,m2,d2;
string s[10];
while(cin>>y1>>m1>>d1>>y2>>m2>>d2){
if(y1<0||m1<0|d1<0||y2<0||m2<0||d2<0)break;
if(m1<3){y1--;m1+=12;}
if(m2<3){y2--;m2+=12;}
d1=long(365.25*y1)+y1/400-y1/100+long(30.59*(m1-2))+d1;
d2=long(365.25*y2)+y2/400-y2/100+long(30.59*(m2-2))+d2;
cout<<d2-d1<<endl;
}
return 0;
}

C++: 
  for(int i = 1 ; i < y ; i++) {
    day += 365;
    if(i % 4 == 0 && i % 100 != 0 || i % 400 == 0) day += 1;
      }

  for(int i = 1 ; i < m ; i++) {
    day += 30;
    if(i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12) day++;
    if(i == 2)  day -= 2; //if(u) day++; }
  }
  for(int i = 0 ; i < d ; i++) {
    day++;
  }
  return day;
}

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

using namespace std;


bool checkUru(const int y){
	if(y==0)
		return false;
	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;

		//if(y1!=y2){
		//	for(int y = y1+1; y < y2; y++){
		//		if(checkUru(y)){
		//			sum+=366;
		//		}
		//		else
		//			sum+=365;
		//	}
		//	// y1ツづ2ツづ可づつつ「ツづ計ツ算
		//	if(checkUru(y1)){
		//		sum+=(md[m1]-d1);
		//		if(m1==2)
		//			sum++;
		//		for(int m=m1+1; m<=12; m++){
		//			if(m==2)
		//				sum++;
		//			sum+=md[m];
		//		}
		//	}
		//	else{
		//		sum+=(md[m1]-d1);
		//		for(int m=m1+1; m<=12; m++){
		//			sum+=md[m];
		//		}
		//	}
		//	
		//	if(checkUru(y2)){
		//		sum+=(d1);

		//		for(int m=1; m<m2; m++){
		//			if(m==2)
		//				sum++;
		//			sum+=md[m];
		//		}
		//	}
		//	else{
		//		sum+=(d1);
		//		for(int m=1; m<m2; m++){
		//			sum+=md[m];
		//		}
		//	}
		//}
		//else{
		//	if(m1!=m2){
		//		for(int m=m1+1; m < m2; m++){
		//			if(checkUru(y1)&&m==2){
		//				sum+=29;
		//			}
		//			else
		//				sum+=md[m];
		//		}
		//		// m1ツづ2ツづ可づつつ「ツづ計ツ算
		//		if(checkUru(y1)&&m1==2){
		//			sum+=(md[m1]-d1)+1;
		//		}
		//		else
		//			sum+=(md[m1]-d1);

		//		// m2
		//		sum+=d2;

		//	}
		//	else{
		//		sum+=d2-d1;
		//	}
		//}
//		cout<<sum<<endl;
	}

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <queue>
#include <vector>
#include <sstream>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;

int f(int y,int m,int d){
	return (y*365+y/4-y/100+y/400+m*28+(m+1)*26/10+d-400);
}

int main(void){

  int d[6];
	while(!cin.eof()){
		rep(i,6) cin >> d[i];
		rep(i,6) if(d[i]<0) goto endd;
		
		cout << (f(d[3],d[4],d[5]) - f(d[0],d[1],d[2])) << endl;
	}
  endd:
	return 0;
	
}

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

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

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 day = 0;

    day += d2-d1;

    for(int i=0;i<m2-m1;i++) { //m2>m1
      day += month[m1+i];
    }

    for(int i=0;i<y2-y1;i++) { //y2>=y1
      if((y1+i) % 4 == 0) {
        if(((y1+i) % 100 == 0) && ((y1+i) % 400 != 0)){
          day += 365;
        }
        else {
          day += 366;
        }
      }
      else {
        day += 365;
      }
    }
    cout << day << endl;
  }
}

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

int main(){
	int x[6];
	int u = 0;
	int day = 0;

	while(cin >> x[0], x[0] != -1){
		for(int i = 1; i < 6; i++)
			cin >> x[i];
		while(1){
			 if(x[0] == x[3] && x[1] == x[4] && x[2] == x[5]){
				 break;
				}else{
					x[5]--; day++;
					if(x[5] == 0){
						x[4]--;
						if(x[4] != 2 && (x[4] == 2 || x[4] == 4 || x[4] == 6 || x[4] == 9 || x[4] == 11)){
							x[5] = 30;
						}else if(x[4] != 2){
							x[5] = 31;
						}else{
							if(x[3] % 4 == 0 && (x[3] % 100 != 0 || x[3] % 400 == 0)){
								x[5] = 29;
							}
							else
								x[5] = 28;
						}
					}
					if(x[4] == 0){
						x[4] = 12;
						x[3]--;
					}
				}
		}
	cout << day << endl;
	day = 0;
	}
}