Go: package main

import (
	"bufio"
		"os"
	"strings"
	"strconv"
	"time"
	"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)))
	}
}

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

using namespace std;


bool checkUru(const int y){

	if(y%4==0&&y%100!=0){
		return true;
	}
	else if(y%400==0){
		return true;
	}
	else
		return false;

	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(const ll y,const ll m,const 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>
#include <vector>
#include <algorithm>

using namespace std;


bool checkUru(const int y){

	//if(y%4==0&&y%100!=0){
	//	return true;
	//}
	//else if(y%400==0){
	//	return true;
	//}
	//else
	//	return false;

	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(const ll y,const ll m,const 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)&&i==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;

static int month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

int uruu(int y, int day)
{
	if (y % 4 == 0 && y % 100 != 0 || y % 400 == 0){
		day++;
	}
	return (day);
}

int main()
{
	int y1, y2, m1, m2, d1, d2;
	
	while (cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2, y1 != -1 && m1 != -1 && d1 != -1 && y2 != -1 && m2 != -1 && d2 != -1){
		int day = 0;
		for (int i = y1; i < y2; i++){
			day = uruu(i, day);
		}
		day += (y2 - y1) * 365;
		for (int i = m1 + 1; i < m2; i++){
			day += month[i];
		}
		if (m1 == m2){
			day += (d2 -d1);
		}
		else {
			day += month[m1] - d1 + d2;
		}
		cout << day << endl;
	}
	return (0);
}

C++: #include<iostream>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)

int month[]={
  0,
  31,//1
  28,//2
  31,//3
  30,//4
  31,//5
  30,//6
  31,//7
  31,//8
  30,//9
  31,//10
  30,//11
  31//12
};
/*
int day(int y,int m,int d){
  int base = y*365+d;
  REP(i,1,m)base+=month[i];
  int lim = m > 2 ? y+1:y;
  
  REP(i,1,y){
    if ( i %400 == 0 ||
	 (i % 100 !=0 && i % 4 == 0))base++;
  }
  return base;
}
*/
int day(int y,int m,int d){
  y += 4800;
  if (m < 3) --y, m += 12;
  return 365L*y+y/4-y/100+y/400+(153*m-457)/5+d-32045;
}

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 a=day(y1,m1,d1),b=day(y2,m2,d2);
    cout << b-a << endl;
  }
}