program dbldate;
{calculates the date when the time between two dates will have doubled
 31 Mar 1988
}
var r,jul,jul1,jul2:real;
    i,id,im,iy,n : integer;
    ch:char;
label 99;

{$i funcs.pas}
{$i julday.pas}
{$i caldat.pas}

begin
    write('1st date (month day year): ');
    readln(im,id,iy);
    IF (im < 0) THEN GOTO 99;
    jul1:=julday(im,id,iy);
    writeln('Julian day: ',jul1:10:0);
    write('2nd date (month day year): ');
    readln(im,id,iy);
    IF (im < 0) THEN GOTO 99;
    jul2:=julday(im,id,iy);
    writeln('Julian day: ',jul2:10:0);
    jul:=jul1+(jul2-jul1)*2.0;
    caldat(jul,im,id,iy);
    writeln('Double date');
    writeln('Julian day: ',jul:10:0,' = ',im:3,id:3,iy:5);
99:;
END.
