Language: C++

import java.util.Scanner;

class Main{
	public static void main(String[] args){

		int[] dayday = new int[6];
		int di;
		boolean flag = false;
		Scanner input = new Scanner(System.in);
		
		while(true){
			di = 0;
			for(int i = 0; i < 6; i++){
				dayday[i] = input.nextInt();
				if (dayday[i] < 0){
					flag = true;
				}
			}
			if(flag) break;
			
			Day day = new Day(dayday[0], dayday[1], dayday[2]);
			day.Day2(dayday[3], dayday[4], dayday[5]);
			
			di += day.year_d();
			di += day.month_d();
			di += day.d_d();
			System.out.println(di);
		}
	}
}

class Day{
	private int year;
	private int month;
	private int date;
	private int year2;
	private int month2;
	private int date2;
	private int uru  = 0;
	
	public Day(int year, int month, int date){
		this.year = year;
		this.month = month;
		this.date = date;
	}
	public void Day2(int year, int month, int date){
		this.year2 = year;
		this.month2 = month;
		this.date2 = date;
	}
	public void printday(){
		System.out.println("year = " + this.year);
		System.out.println("month = " + this.month);
		System.out.println("date = " + this.date);
		System.out.println("year2 = " + this.year2);
		System.out.println("month2 = " + this.month2);
		System.out.println("date2 = " + this.date2);
	}
	public int year_d(){
		for (int i = this.year; i < this.year2; i++){
			if (i%4 == 0 && !(i%100 == 0) || i%400 == 0){
				this.uru++;
			}
		}
		return (this.year2 - this.year) * 365 + uru;
	}
	public int month_d(){
		int sum = 0;
		int sum2 = 0;
		for (int i = 1; i < this.month; i++){
			if(i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12){
				sum += 31;
			}
			else if(i == 2) {
				sum += 28;
				if(uru > 0){
					sum--;
				}
			}
			else{
				sum += 30;
			}
		}
		
		for (int i = 1; i < this.month2; i++){
			if(i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12){
				sum2 += 31;
			}
			else if(i == 2) {
				sum2 += 28;
				if(uru > 0){
					sum2--;
				}
			}
			else{
				sum2 += 30;
			}
		}
		
		return sum2 - sum;
	}
	
	public int d_d(){
		this.date2 -= this.date;
		
		return date2;
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
    4 |         public static void main(String[] args){
      |               ^~~~~~~
      |               :
a.cc:4:33: error: 'String' has not been declared
    4 |         public static void main(String[] args){
      |                                 ^~~~~~
a.cc:4:42: error: expected ',' or '...' before 'args'
    4 |         public static void main(String[] args){
      |                                          ^~~~
a.cc:30:2: error: expected ';' after class definition
   30 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:20: error: structured binding declaration cannot have type 'int'
    6 |                 int[] dayday = new int[6];
      |                    ^~
a.cc:6:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:6:20: error: empty structured binding declaration
a.cc:6:23: error: expected initializer before 'dayday'
    6 |                 int[] dayday = new int[6];
      |                       ^~~~~~
a.cc:8:17: error: 'boolean' was not declared in this scope; did you mean 'bool'?
    8 |                 boolean flag = false;
      |                 ^~~~~~~
      |                 bool
a.cc:9:17: error: 'Scanner' was not declared in this scope
    9 |                 Scanner input = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:14:33: error: 'dayday' was not declared in this scope
   14 |                                 dayday[i] = input.nextInt();
      |                                 ^~~~~~
a.cc:14:45: error: 'input' was not declared in this scope; did you mean 'int'?
   14 |                                 dayday[i] = input.nextInt();
      |                                             ^~~~~
      |                                             int
a.cc:16:41: error: 'flag' was not declared in this scope
   16 |                                         flag = true;
      |                                         ^~~~
a.cc:19:28: error: 'flag' was not declared in this scope
   19 |                         if(flag) break;
      |                            ^~~~
a.cc:21:25: error: 'Day' was not declared in this scope
   21 |                         Day day = new Day(dayday[0], dayday[1], dayday[2]);
      |                         ^~~
a.cc:22:25: error: 'day' was not declared in this scope
   22 |                         day.Day2(dayday[3], dayday[4], dayday[5]);
      |                         ^~~
a.cc:22:34: error: 'dayday' was not declared in this scope
   22 |                         day.Day2(dayday[3], dayday[4], dayday[5]);
      |                                  ^~~~~~
a.cc:27:25: error: 'System' was not declared in this scope
   27 |                         System.out.println(di);
      |                         ^~~~~~
a.cc: At global scope:
a.cc:33:16: error: expected ':' before 'int'
   33 |         private int year;
      |                ^~~~
      |                :
a.cc:34:16: error: expected ':' before 'int'
   34 |         private int month;
      |                ^~~~
      |                :
a.cc:35:16: error: expected ':' before 'int'
   35 |         private int date;
      |                ^~~~
      |                :
a.cc:36:16: error: expected ':' before 'int'
   36 |         private int year2;
      |                ^~~~
      |                :
a.cc:37:16: error: expected ':' before 'int'
   37 |         private int month2;
      |                ^~~~
      |                :
a.cc:38:16: error: expected ':' before 'int'
   38 |         private int date2;
      |                ^~~~
      |                :
a.cc:39:16: error: expected ':' before 'int'
   39 |         private int uru  = 0;
      |                ^~~~
      |                :
a.cc:41:15: error: expected ':' before 'Day'
   41 |         public Day(int year, int month, int date){
      |               ^~~~
      |               :
a.cc:46:15: error: expected ':' before 'void'
   46 |         public void Day2(int year, int month, int date){
      |               ^~~~~
      |               :
a.cc:51:15: error: expected ':' before 'void'
   51 |         public void printday(){
      |               ^~~~~
      |               :
a.cc:59:15: error: expected ':' before 'int'
   59 |         public int year_d(){
      |               ^~~~
      |               :
a.cc:67:15: error: expected ':' before 'int'
   67 |         public int month_d(){
      |               ^~~~
      |               :
a.cc:103:15: error: expected ':' before 'int'
  103 |         public int d_d(){
      |               ^~~~
      |               :
a.cc:108:2: error: expected ';' after class definition
  108 | }
      |  ^
      |  ;
a.cc: In constructor 'Day::Day(int, int, int)':
a.cc:42:22: error: request for member 'year' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   42 |                 this.year = year;
      |                      ^~~~
a.cc:43:22: error: request for member 'month' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   43 |                 this.month = month;
      |                      ^~~~~
a.cc:44:22: error: request for member 'date' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   44 |                 this.date = date;
      |                      ^~~~
a.cc: In member function 'void Day::Day2(int, int, int)':
a.cc:47:22: error: request for member 'year2' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   47 |                 this.year2 = year;
      |                      ^~~~~
a.cc:48:22: error: request for member 'month2' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   48 |                 this.month2 = month;
      |                      ^~~~~~
a.cc:49:22: error: request for member 'date2' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   49 |                 this.date2 = date;
      |                      ^~~~~
a.cc: In member function 'void Day::printday()':
a.cc:52:17: error: 'System' was not declared in this scope
   52 |                 System.out.println("year = " + this.year);
      |                 ^~~~~~
a.cc:52:53: error: request for member 'year' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   52 |                 System.out.println("year = " + this.year);
      |                                                     ^~~~
a.cc:53:54: error: request for member 'month' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   53 |                 System.out.println("month = " + this.month);
      |                                                      ^~~~~
a.cc:54:53: error: request for member 'date' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   54 |                 System.out.println("date = " + this.date);
      |                                                     ^~~~
a.cc:55:54: error: request for member 'year2' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   55 |                 System.out.println("year2 = " + this.year2);
      |                                                      ^~~~~
a.cc:56:55: error: request for member 'month2' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   56 |                 System.out.println("month2 = " + this.month2);
      |                                                       ^~~~~~
a.cc:57:54: error: request for member 'date2' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   57 |                 System.out.println("date2 = " + this.date2);
      |                                                      ^~~~~
a.cc: In member function 'int Day::year_d()':
a.cc:60:35: error: request for member 'year' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   60 |                 for (int i = this.year; i < this.year2; i++){
      |                                   ^~~~
a.cc:60:50: error: request for member 'year2' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   60 |                 for (int i = this.year; i < this.year2; i++){
      |                                                  ^~~~~
a.cc:62:38: error: request for member 'uru' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   62 |                                 this.uru++;
      |                                      ^~~
a.cc:65:30: error: request for member 'year2' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   65 |                 return (this.year2 - this.year) * 365 + uru;
      |                              ^~~~~
a.cc:65:43: error: request for member 'year' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   65 |                 return (this.year2 - this.year) * 365 + uru;
      |                                           ^~~~
a.cc: In member function 'int Day::month_d()':
a.cc:70:42: error: request for member 'month' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   70 |                 for (int i = 1; i < this.month; i++){
      |                                          ^~~~~
a.cc:85:42: error: request for member 'month2' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
   85 |                 for (int i = 1; i < this.month2; i++){
      |                                          ^~~~~~
a.cc: In member function 'int Day::d_d()':
a.cc:104:22: error: request for member 'date2' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
  104 |                 this.date2 -= this.date;
      |                      ^~~~~
a.cc:104:36: error: request for member 'date' in '(Day*)this', which is of pointer type 'Day*' (maybe you meant to use '->' ?)
  104 |                 this.date2 -= this.date;