program enshu02d2                                                        
implicitnone
integer::seireki,joutai
real,dimension(12)::kion
real::kion_nen_heikin,kion_nen_heikin1
do
read(*,'(i4,12f5.1)',iostat=joutai)seireki,kion
if(joutai/=0)exit
kion_nen_heikin=sum(kion)/12.0
kion_nen_heikin1&
=kion(1)*31.0/365.0&
+kion(2)*28.0/365.0&
+kion(3)*31.0/365.0&
+kion(4)*30.0/365.0&
+kion(5)*31.0/365.0&
+kion(6)*30.0/365.0&
+kion(7)*31.0/365.0&
+kion(8)*31.0/365.0&
+kion(9)*30.0/365.0&
+kion(10)*31.0/365.0&
+kion(11)*30.0/365.0&
+kion(12)*31.0/365.0
write(*,'(i4,14f6.1)')seireki,kion,kion_nen_heikin,kion_nen_heikin1
enddo
endprogramenshu02d2